Skip to content

Commit

Permalink
Stop users without QueuedGeneration crashing sync worker
Browse files Browse the repository at this point in the history
  • Loading branch information
cpfair committed Jul 17, 2015
1 parent 750a0f1 commit 607446e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tapiriik/sync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _consumeSyncTask(body, message, heartbeat_callback_direct, version):
logger.warning("Could not find user %s - bailing" % user_id)
message.ack() # Otherwise the entire thing grinds to a halt
return
if body["generation"] != user["QueuedGeneration"]:
if body["generation"] != user.get("QueuedGeneration", None):
# QueuedGeneration being different means they've gone through sync_scheduler since this particular message was queued
# So, discard this and wait for that message to surface
# Should only happen when I manually requeue people
Expand Down

0 comments on commit 607446e

Please sign in to comment.