Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/284836
Change subject: statsv: Start at offset LATEST instead of the default EARLIEST
......................................................................
statsv: Start at offset LATEST instead of the default EARLIEST
When statsv needs to restart for some reason, it should not replay
the last 7 days of events. Rather it should just start listening
to current events.
Bug: T132770
Change-Id: Ib7e248ccfd7f32fef24fc1c33979009aba790209
---
M statsv.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/statsv
refs/changes/36/284836/1
diff --git a/statsv.py b/statsv.py
index 95563be..12d0052 100644
--- a/statsv.py
+++ b/statsv.py
@@ -81,7 +81,7 @@
worker.start()
topic = kafka.topics['statsv']
-consumer = topic.get_simple_consumer()
+consumer = topic.get_simple_consumer(auto_offset_reset=OffsetType.LATEST)
for message in consumer:
if message is not None:
queue.put(message.value)
--
To view, visit https://gerrit.wikimedia.org/r/284836
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7e248ccfd7f32fef24fc1c33979009aba790209
Gerrit-PatchSet: 1
Gerrit-Project: analytics/statsv
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits