summaryrefslogtreecommitdiff
path: root/python/pgq/consumer.py
diff options
context:
space:
mode:
authorMarko Kreen2007-07-16 14:06:21 +0000
committerMarko Kreen2007-07-16 14:06:21 +0000
commit08c0653c5f01ff6e371f70b5da76422344acf3b7 (patch)
tree586cd0577c6641d22e0c152256c7a6142ac370c7 /python/pgq/consumer.py
parent80178533a62b1c121dd29b33a15e527cf8924fad (diff)
pgq.consumer: dont allow big seeking around
Diffstat (limited to 'python/pgq/consumer.py')
-rw-r--r--python/pgq/consumer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/pgq/consumer.py b/python/pgq/consumer.py
index bd49dccf..8160f1d1 100644
--- a/python/pgq/consumer.py
+++ b/python/pgq/consumer.py
@@ -334,6 +334,8 @@ class SerialConsumer(Consumer):
return False
if prev_tick < dst_tick:
+ if dst_tick - prev_tick > 5:
+ raise Exception('Difference too big, skipping dangerous')
self.log.warning('Got tick %d, dst has %d - skipping' % (prev_tick, dst_tick))
return True
else: