Skip to content

Commit

Permalink
Limiting Tape recall days to now+4 days (#8548)
Browse files Browse the repository at this point in the history
* Limiting Tape recall days to now+4 days

See Issue #8546

* Removing time.time() from tasklifetime

* Removing import of unused Tasklifetime

See #8546
  • Loading branch information
aspiringmind-code authored Jul 11, 2024
1 parent 9728a85 commit 1e31da5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/python/TaskWorker/Actions/Recurring/TapeRecallManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from rucio.common.exception import RuleNotFound

from ServerUtilities import MAX_DAYS_FOR_TAPERECALL, TASKLIFETIME, getTimeFromTaskname
from ServerUtilities import MAX_DAYS_FOR_TAPERECALL, getTimeFromTaskname
from RESTInteractions import CRABRest
from RucioUtils import getNativeRucioClient
from TaskWorker.MasterWorker import getRESTParams
Expand Down Expand Up @@ -124,9 +124,9 @@ def handleRecall(self):
self.updateTaskStatus(taskName, 'NEW')
# Clean up previous "dataset on tape" warnings
self.deleteWarnings(taskName)
# Make sure data will stay on disk
self.logger.info("Extending rule lifetime to last as long as the task")
self.privilegedRucioClient.update_replication_rule(reqId, {'lifetime': TASKLIFETIME})
# Make sure data will stay on disk for NOW + 4 days
self.logger.info("Extending rule lifetime to last 4 days")
self.privilegedRucioClient.update_replication_rule(reqId, {'lifetime': (4 * 24 * 60 * 60)}) #lifetime is in seconds
else:
# still in progress, report status and keep waiting
ok = rule['locks_ok_cnt']
Expand Down

0 comments on commit 1e31da5

Please sign in to comment.