Slightly increase the leniency for forwarding 'old' messages.

There are non-buggy situations when it can be higher than 5 seconds.

(imported from commit cc63c0bdb10a201cc30c17854e5a506bac7e68d7)
This commit is contained in:
Tim Abbott 2012-10-03 17:08:07 -04:00
parent d2a43dd6e1
commit 8f1a418fd0

View file

@ -245,7 +245,7 @@ def forward_to_zephyr(message):
def maybe_forward_to_zephyr(message): def maybe_forward_to_zephyr(message):
if message["sender_email"] == os.environ["USER"] + "@mit.edu": if message["sender_email"] == os.environ["USER"] + "@mit.edu":
if float(message["timestamp"]) < float(datetime.datetime.now().strftime("%s")) - 5: if float(message["timestamp"]) < float(datetime.datetime.now().strftime("%s")) - 15:
print "Alert! Out of order message!", message["timestamp"], datetime.datetime.now().strftime("%s") print "Alert! Out of order message!", message["timestamp"], datetime.datetime.now().strftime("%s")
return return
forward_to_zephyr(message) forward_to_zephyr(message)