JobCommand
JobCommand
The JobCommand class is a command class to know about present jobs efficiency
- class DIRAC.ResourceStatusSystem.Command.JobCommand.JobCommand(args=None, clients=None)
Bases:
Command
Job “master” Command.
- __init__(args=None, clients=None)
- doCache()
Method that reads the cache table and tries to read from it. It will return a list of dictionaries if there are results.
- doCommand()
Real commands don’t need to extende/replace this method, which is called by clients.
What is done here is the following: if self.masterMode is set to True, then the “doMaster()” method is called. if not, then the doCache() method is called, and if this returns an object this is returned, and otherwise the “doNew” method is called.
- doMaster()
Master method.
Gets all sites and calls doNew method.
- doNew(masterParams=None)
Gets the parameters to run, either from the master method or from its own arguments.
It contacts the WMSAdministrator with a list of site names, or a single site.
If there are jobs, are recorded and then returned.
- returnERROR(s_obj)
Overwrites S_ERROR message with command name, much easier to debug
- returnSObj(s_obj)
Overwrites S_ERROR message with command name, much easier to debug
- class DIRAC.ResourceStatusSystem.Command.JobCommand.JobsWMSCommand(args=None, clients=None)
Bases:
Command
- __init__(args=None, clients=None)
- doCache()
To be extended/replaced by real commands
- doCommand()
Returns simple jobs efficiency
- Parameters:
args –
args[0]: string: should be a ValidElement
args[1]: string should be the name of the ValidElement
- Returns:
{ ‘Result’: ‘Good’|’Fair’|’Poor’|’Idle’|’Bad’ }
- doMaster()
To be extended/replaced by real commands
- doNew(masterParams=None)
To be extended/replaced by real commands
- returnERROR(s_obj)
Overwrites S_ERROR message with command name, much easier to debug
- returnSObj(s_obj)
Overwrites S_ERROR message with command name, much easier to debug