GGUSTicketsCommand
GGUSTicketsCommand
The GGUSTickets_Command class is a command class to know about the number of active present opened tickets.
- class DIRAC.ResourceStatusSystem.Command.GGUSTicketsCommand.GGUSTicketsCommand(args=None, clients=None)
Bases:
Command
GGUSTickets “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, which looks little bit spaguetti code, sorry ! - It gets all gocSites.
As there is no bulk query, it compares with what we have on the database. It queries a portion of them.
- doNew(masterParams=None)
Gets the parameters to run, either from the master method or from its own arguments.
For every elementName ( cannot process bulk queries.. ) contacts the ggus client. The server is not very stable, so we protect against crashes.
If there are ggus tickets, 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