From e432e62cc2ae7c7cbe7639eb476939ddc27afb85 Mon Sep 17 00:00:00 2001 From: josef Date: Mon, 19 Oct 2015 12:11:39 +0200 Subject: adding script for inclusion checking by submitting to all logs and checking timestamp age --- monitor/josef_mover.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'monitor/josef_mover.py') diff --git a/monitor/josef_mover.py b/monitor/josef_mover.py index 436e6b4..08ec05d 100755 --- a/monitor/josef_mover.py +++ b/monitor/josef_mover.py @@ -50,8 +50,8 @@ def print_reply(rep, entry): def is_new_timestamp(ts): MAX_TIMEDIFF = 300 # 5 min, allows for some clock skew ts_time = datetime.datetime.fromtimestamp(ts / 1000, UTC()).strftime('%Y-%m-%d %H:%M:%S') - cur_time = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S') - delta_time = datetime.datetime.strptime(cur_time, '%Y-%m-%d %H:%M:%S') - datetime.datetime.strptime(ts_time, '%Y-%m-%d %H:%M:%S') + start_time = datetime.datetime.utcnow().strftime('2013-10-19 00:00:00') + delta_time = datetime.datetime.strptime(start_time, '%Y-%m-%d %H:%M:%S') - datetime.datetime.strptime(ts_time, '%Y-%m-%d %H:%M:%S') # print delta_time.seconds if delta_time.seconds > MAX_TIMEDIFF: return False @@ -131,7 +131,7 @@ if __name__ == "__main__": # dests = ctlogs first = 100 - last = 101 + last = 102 move_entry(first, last, source,dests) # check_inclusion_all(first,last,source, dests) -- cgit v1.1