Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 08:39:02

0001 """
0002 This class is a dummy plugin. It inherits from the SetupperPluginBase class.
0003 """
0004 import uuid
0005 
0006 from typing import List, Dict
0007 
0008 from pandaserver.dataservice.setupper_plugin_base import SetupperPluginBase
0009 
0010 
0011 class SetupperDummyPlugin(SetupperPluginBase):
0012     """
0013     This class is a dummy plugin. It inherits from the SetupperPluginBase class.
0014     """
0015 
0016     # constructor
0017     def __init__(self, taskBuffer, jobs: List, logger, **params: Dict) -> None:
0018         """
0019         Constructor for the SetupperDummyPlugin class.
0020 
0021         :param taskBuffer: The buffer for tasks.
0022         :param jobs: The jobs to be processed.
0023         :param logger: The logger to be used for logging.
0024         :param params: Additional parameters.
0025         """
0026         # defaults
0027         default_map = {}
0028         SetupperPluginBase.__init__(self, taskBuffer, jobs, logger, params, default_map)
0029 
0030     # main
0031     def run(self) -> None:
0032         """
0033         The main method that runs the plugin. It iterates over the jobs and their files.
0034         If a file is of type "log", it generates a GUID for it.
0035         """
0036         for job_spec in self.jobs:
0037             for file_spec in job_spec.Files:
0038                 if file_spec.type == "log":
0039                     # generate GUID
0040                     file_spec.GUID = str(uuid.uuid4())
0041 
0042     # post run
0043     def post_run(self) -> None:
0044         """
0045         This method is called after the run method. Currently, it does nothing.
0046         """
0047         pass