Back to home page

EIC code displayed by LXR

 
 

    


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

0001 from pandaharvester.harvestersweeper.base_sweeper import BaseSweeper
0002 
0003 
0004 # dummy plugin for sweeper
0005 class DummySweeper(BaseSweeper):
0006     # constructor
0007     def __init__(self, **kwarg):
0008         BaseSweeper.__init__(self, **kwarg)
0009 
0010     # kill a worker (DEPRECATED)
0011     def kill_worker(self, workspec):
0012         """Kill a worker in a scheduling system like batch systems and computing elements.
0013 
0014         :param workspec: worker specification
0015         :type workspec: WorkSpec
0016         :return: A tuple of return code (True for success, False otherwise) and error dialog
0017         :rtype: (bool, string)
0018         """
0019         return True, ""
0020 
0021     # kill workers
0022     def kill_workers(self, workspec_list):
0023         """Kill workers in a scheduling system like batch systems and computing elements.
0024 
0025         :param workspec_list: a list of workspec instances
0026         :return: A list of tuples of return code (True for success, False otherwise) and error dialog
0027         :rtype: [(bool, string), ...]
0028         """
0029         retList = []
0030         for workspec in workspec_list:
0031             retList.append((True, ""))
0032         return retList
0033 
0034     # cleanup for a worker
0035     def sweep_worker(self, workspec):
0036         """Perform cleanup procedures for a worker, such as deletion of work directory.
0037         The list of JobSpecs associated to the worker is available in workspec.get_jobspec_list().
0038         The list of input and output FileSpecs, which are not used by any active jobs and thus can
0039         safely be deleted, is available in JobSpec.get_files_to_delete().
0040 
0041         :param workspec: worker specification
0042         :type workspec: WorkSpec
0043         :return: A tuple of return code (True for success, False otherwise) and error dialog
0044         :rtype: (bool, string)
0045         """
0046         return True, ""