File indexing completed on 2026-04-10 08:39:16
0001
0002
0003
0004
0005
0006
0007
0008
0009 """
0010 Pilot Config specific info provider mainly used to customize Queue, Site, etc data of Information Service
0011 with details fetched directly from local Pilot instance configuration
0012
0013 :author: Alexey Anisenkov
0014 :contact: anisyonk@cern.ch
0015 :date: January 2018
0016 """
0017
0018 from ..util.config import config
0019
0020 import logging
0021 logger = logging.getLogger(__name__)
0022
0023
0024 class PilotConfigProvider(object):
0025 """
0026 Info provider which is used to extract settings specific for local Pilot instance
0027 and overwrite general configuration used by Information Service
0028 """
0029
0030 config = None
0031
0032 def __init__(self, conf=None):
0033 self.config = conf or config
0034
0035 def resolve_schedconf_sources(self):
0036 """
0037 Resolve prioritized list of source names to be used for SchedConfig data load
0038 :return: prioritized list of source names
0039 """
0040
0041
0042
0043
0044
0045 return None
0046
0047 def resolve_queuedata(self, pandaqueue, **kwargs):
0048 """
0049 Resolve queue data details
0050
0051 :param pandaqueue: name of PandaQueue
0052 :return: dict of settings for given PandaQueue as a key
0053 """
0054
0055 import ast
0056 data = {
0057 'maxwdir_broken': self.config.Pilot.maximum_input_file_sizes,
0058
0059
0060
0061 'es_stageout_gap': 601,
0062 }
0063
0064 if hasattr(self.config.Information, 'acopytools'):
0065 data['acopytools'] = ast.literal_eval(self.config.Information.acopytools)
0066
0067 logger.info('queuedata: following keys will be overwritten by config values: %s' % data)
0068
0069 return {pandaqueue: data}