summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjosef <josef.gson@gmail.com>2015-10-19 12:11:39 +0200
committerjosef <josef.gson@gmail.com>2015-10-19 12:11:39 +0200
commite432e62cc2ae7c7cbe7639eb476939ddc27afb85 (patch)
treec39a3984537abfc800adf1f1b3f69777143a1db3
parentcc06b25e43deeee70418a1ee9f6271ed9fed0c83 (diff)
adding script for inclusion checking by submitting to all logs and checking timestamp age
-rwxr-xr-xmonitor/josef_mover.py6
1 files changed, 3 insertions, 3 deletions
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)