From 7f31f11d1ac792e6d88fb97d2a4e77f450d49e03 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Thu, 28 Jun 2018 13:43:15 +0000 Subject: [PATCH] SW-283: use unix epoch to force faster visit --- LTA/ltastorageoverview/lib/ingesteventhandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTA/ltastorageoverview/lib/ingesteventhandler.py b/LTA/ltastorageoverview/lib/ingesteventhandler.py index 75d927c626f..58d743a5aca 100755 --- a/LTA/ltastorageoverview/lib/ingesteventhandler.py +++ b/LTA/ltastorageoverview/lib/ingesteventhandler.py @@ -66,13 +66,13 @@ class IngestEventHandler(IngestBusListener): def _markDirectoryForAVisit(self, dir_id): ''' - update the directory's last visit time to now-VISIT_INTERVAL, + update the directory's last visit time to unix-epoch (which is the lowest possible visit timestamp), so that it appears in the visitStats which are used by the scraper to determine the next directory to be visited. :param int dir_id: the id of the directory :return: None ''' with store.LTAStorageDb(self._dbcreds) as db: - return db.updateDirectoryLastVisitTime(dir_id, datetime.utcnow() - VISIT_INTERVAL) + return db.updateDirectoryLastVisitTime(dir_id, datetime.fromtimestamp(0)) def _get_site_from_db(self, srm_url): """ -- GitLab