Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ tests/CI/SERVERCONFIG

# VSCode
.vscode
.env

# docs
# this is auto generated
Expand Down
38 changes: 25 additions & 13 deletions DataManagementSystem/Agent/FTS3Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,24 +354,36 @@ def _treatOperation(self, operation):
continueOperationProcessing = True

# Check the status of the associated RMS Request.
# If it is canceled then we will not create new FTS3Jobs, and mark
# If it is canceled or does not exist anymore then we will not create new FTS3Jobs, and mark
# this as FTS3Operation canceled.

if operation.rmsReqID:
res = ReqClient().getRequestStatus(operation.rmsReqID)
if not res['OK']:
log.error("Could not get request status", res)
return operation, res
rmsReqStatus = res['Value']

if rmsReqStatus == 'Canceled':
log.info(
"The RMS Request is canceled, canceling the FTS3Operation",
"rmsReqID: %s, FTS3OperationID: %s" %
(operation.rmsReqID,
operation.operationID))
operation.status = 'Canceled'
continueOperationProcessing = False
# If the Request does not exist anymore
if cmpError(res, errno.ENOENT):
log.info(
"The RMS Request does not exist anymore, canceling the FTS3Operation",
"rmsReqID: %s, FTS3OperationID: %s" %
(operation.rmsReqID,
operation.operationID))
operation.status = 'Canceled'
continueOperationProcessing = False
else:
log.error("Could not get request status", res)
return operation, res

else:
rmsReqStatus = res['Value']

if rmsReqStatus == 'Canceled':
log.info(
"The RMS Request is canceled, canceling the FTS3Operation",
"rmsReqID: %s, FTS3OperationID: %s" %
(operation.rmsReqID,
operation.operationID))
operation.status = 'Canceled'
continueOperationProcessing = False

if continueOperationProcessing:
res = operation.prepareNewJobs(
Expand Down
Loading