Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-20 07:58:59

0001 from pandaharvester.harvestercore.plugin_base import PluginBase
0002 from pandaharvester.harvestermover import mover_utils
0003 
0004 
0005 # preparator plugin with RSE + no data motion
0006 class RseDirectPreparator(PluginBase):
0007     """The workflow for RseDirectPreparator is as follows. First panda makes a rule to
0008     transfer files to an RSE which is associated to the resource. Once files are transferred
0009     to the RSE, job status is changed to activated from assigned. Then Harvester fetches
0010     the job and constructs input file paths that point to pfns in the storage. This means
0011     that the job directly read input files from the storage.
0012     """
0013 
0014     # constructor
0015 
0016     def __init__(self, **kwarg):
0017         PluginBase.__init__(self, **kwarg)
0018 
0019     # check status
0020     def check_stage_in_status(self, jobspec):
0021         return True, ""
0022 
0023     # trigger preparation
0024     def trigger_preparation(self, jobspec):
0025         return True, ""
0026 
0027     # resolve input file paths
0028     def resolve_input_paths(self, jobspec):
0029         # get input files
0030         inFiles = jobspec.get_input_file_attributes()
0031         # set path to each file
0032         for inLFN, inFile in inFiles.items():
0033             inFile["path"] = mover_utils.construct_file_path(self.basePath, inFile["scope"], inLFN)
0034         # set
0035         jobspec.set_input_file_paths(inFiles)
0036         return True, ""