TornadoPilotLoggingClient
- class DIRAC.WorkloadManagementSystem.Client.TornadoPilotLoggingClient.TornadoPilotLoggingClient(url=None, **kwargs)
Bases:
Client
- __init__(url=None, **kwargs)
Initialise a client.
- property call
To be removed once we’re sure self.call has been removed
- Type:
Deprecated
- executeRPC(*parms, **kws)
This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.
- Parameters:
rpc – if an RPC client is passed, use that one
timeout – we can change the timeout on a per call bases. Default is self.timeout
url – We can specify which url to use
- finaliseLogs(self, payload, pilotUUID, wnVO, **kwargs)
Finalise a log file. Finalised logfile can be copied to a secure location, if a file cache is used.
- Parameters:
payload (dict) – data passed to the plugin finaliser.
pilotUUID – pilot UUID
pilotUUID – VO manually enforced by a client, used if no VO in a proxy/token
- Returns:
S_OK or S_ERROR (via the plugin involved)
- Return type:
Automatically created for the service function
export_finaliseLogs()
- getClientKWArgs()
Returns a copy of the connection arguments
- getLogs(self, logfile, vo, **kwargs)
Get (not yet finalised) logs from the server.
- Returns:
S_OK containing a metadata dictionary
- Return type:
Automatically created for the service function
export_getLogs()
- Parameters:
logfile – logfile
vo – vo
- getMetadata(self, **kwargs)
Get PilotLoggingHandler metadata. Intended to be used by a client or an agent.
- Returns:
S_OK containing a metadata dictionary
Automatically created for the service function
export_getMetadata()
- getServer()
Getter for the server url. Useful ?
- httpsClient
alias of
TornadoClient
- sendMessage(self, message, pilotUUID, wnVO, **kwargs)
The method logs messages to Tornado and forwards pilot log files, one per pilot, to a relevant plugin. The pilot is identified by its UUID.
- Parameters:
message – message sent by a client, a list of strings in JSON format
pilotUUID – pilot UUID
pilotUUID – VO manually enforced by a client, used if no VO in a proxy/token
- Returns:
S_OK or S_ERROR if a plugin cannot process the message.
- Return type:
Automatically created for the service function
export_sendMessage()
- setServer(url)
Set the server URL used by default
- Parameters:
url – url of the service