aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/workers
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools/workers')
-rw-r--r--python/fatcat_tools/workers/changelog.py3
-rw-r--r--python/fatcat_tools/workers/worker_common.py4
2 files changed, 3 insertions, 4 deletions
diff --git a/python/fatcat_tools/workers/changelog.py b/python/fatcat_tools/workers/changelog.py
index 636ed304..39a84f18 100644
--- a/python/fatcat_tools/workers/changelog.py
+++ b/python/fatcat_tools/workers/changelog.py
@@ -34,7 +34,7 @@ class ChangelogWorker(FatcatWorker):
self.offset = 1
with topic.get_producer() as producer:
- while True:
+ while True:
latest = int(self.api.get_changelog(limit=1)[0].index)
if latest > self.offset:
print("Fetching changelogs from {} through {}".format(
@@ -101,4 +101,3 @@ class EntityUpdatesWorker(FatcatWorker):
timestamp=None,
)
#consumer.commit_offsets()
-
diff --git a/python/fatcat_tools/workers/worker_common.py b/python/fatcat_tools/workers/worker_common.py
index b84341c7..57fb710c 100644
--- a/python/fatcat_tools/workers/worker_common.py
+++ b/python/fatcat_tools/workers/worker_common.py
@@ -4,10 +4,11 @@ import sys
import csv
import json
import itertools
-import fatcat_client
from itertools import islice
from pykafka import KafkaClient
from pykafka.common import OffsetType
+
+import fatcat_client
from fatcat_client.rest import ApiException
@@ -51,4 +52,3 @@ class FatcatWorker:
self.kafka = KafkaClient(hosts=kafka_hosts, broker_version="1.0.0")
self.produce_topic = produce_topic
self.consume_topic = consume_topic
-