ReqClient
- mod
ReqClient
- class DIRAC.RequestManagementSystem.Client.ReqClient.ReqClient(url=None, **kwargs)
Bases:
DIRAC.Core.Base.Client.Client
ReqClient is a class manipulating and operation on Requests.
- __init__(url=None, **kwargs)
c’tor
- Parameters
self – self reference
url – url of the ReqManager
kwargs – forwarded to the Base Client class
- property call
To be removed once we’re sure self.call has been removed
- Type
Deprecated
- deleteRequest(requestID)
delete request given it’s ID
- Parameters
self – self reference
requestID (str) – request ID
- 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
- finalizeRequest(requestID, jobID, useCertificates=True)
- check request status and perform finalization if necessary
update the request status and the corresponding job parameter
- getBulkRequests(numberOfRequest=10, assigned=True)
get bulk requests from RequestDB
- Parameters
self – self reference
numberOfRequest (str) – size of the bulk (default 10)
- Returns
S_OK( Successful : { requestID, RequestInstance }, Failed : message ) or S_ERROR
- getClientKWArgs()
Returns a copy of the connection arguments
- getDBSummary()
Get the summary of requests in the RequestDBs.
- getDigest(requestID)
Get the request digest given a request ID.
- Parameters
self – self reference
requestID (str) – request id
- getRequest(requestID=0)
Get request from RequestDB
- Parameters
self – self reference
requestID (int) – ID of the request. If 0, choice is made for you
- Returns
S_OK( Request instance ) or S_OK() or S_ERROR
- getRequestFileStatus(requestID, lfns)
Get file status for request given a request id.
- getRequestIDsForJobs(jobIDs)
get the request ids for the supplied jobIDs.
- Parameters
self – self reference
jobIDs (list) – list of job IDs (integers)
- Returns
S_ERROR or S_OK( “Successful”: { jobID1: reqID1, jobID2: requID2, … }, “Failed” : { jobIDn: errMsg, jobIDm: errMsg, …} )
- getRequestIDsList(statusList=None, limit=None, since=None, until=None, getJobID=False)
get at most :limit: request ids with statuses in :statusList:
- getRequestInfo(requestID)
The the request info given a request id.
- Parameters
self – self reference
requestID (int) – request nid
- getRequestStatus(requestID)
Get the request status given a request id.
- Parameters
self – self reference
requestID (int) – id of the request
- getScheduledRequest(operationID)
get scheduled request given its scheduled OperationID
- getServer()
Getter for the server url. Useful ?
- httpsClient
alias of
DIRAC.Core.Tornado.Client.TornadoClient.TornadoClient
- peekRequest(requestID)
peek request
- putRequest(request, useFailoverProxy=True, retryMainService=0)
Put request to RequestManager
- readRequestsForJobs(jobIDs)
read requests for jobs
- Parameters
jobIDs (list) – list with jobIDs
- Returns
S_OK( { “Successful” : { jobID1 : Request, … }, “Failed” : { jobIDn : “Fail reason” } } )
- requestProxies(timeout=120)
get request proxies dict
- requestValidator()
get request validator
- resetFailedRequest(requestID, allR=False)
Reset a failed request to “Waiting” status
- setServer(url)
Set the server URL used by default
- Parameters
url – url of the service
- DIRAC.RequestManagementSystem.Client.ReqClient.prettyPrint(mainItem, key='', offset=0)
- DIRAC.RequestManagementSystem.Client.ReqClient.printFTSJobs(request)
Prints the FTSJobs associated to a request
- Parameters
request – Request object
- DIRAC.RequestManagementSystem.Client.ReqClient.printFile(indexFile)
- DIRAC.RequestManagementSystem.Client.ReqClient.printOperation(indexOperation, verbose=True, onlyFailed=False)
- DIRAC.RequestManagementSystem.Client.ReqClient.printRequest(request, status=None, full=False, verbose=True, terse=False)
- DIRAC.RequestManagementSystem.Client.ReqClient.recoverableRequest(request)