diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-28 15:30:06 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-28 15:30:06 -0800 |
commit | 1eeecb90a4ce743d4d83c651b9e8c0128541404a (patch) | |
tree | eb63383e10f17ecf0968a0aab26e3f42b218a534 /python/fatcat_tools/workers/elasticsearch.py | |
parent | f6f7450903bdbe36bd5fff146b942e34ad221557 (diff) | |
download | fatcat-1eeecb90a4ce743d4d83c651b9e8c0128541404a.tar.gz fatcat-1eeecb90a4ce743d4d83c651b9e8c0128541404a.zip |
fatcat -> fatcat_release ES index
Diffstat (limited to 'python/fatcat_tools/workers/elasticsearch.py')
-rw-r--r-- | python/fatcat_tools/workers/elasticsearch.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/fatcat_tools/workers/elasticsearch.py b/python/fatcat_tools/workers/elasticsearch.py index 3adb088e..0a49192e 100644 --- a/python/fatcat_tools/workers/elasticsearch.py +++ b/python/fatcat_tools/workers/elasticsearch.py @@ -4,7 +4,7 @@ import time import requests from pykafka.common import OffsetType -from fatcat_client import ReleaseEntity +from fatcat_client import ReleaseEntity, ApiClient from fatcat_tools import * from .worker_common import FatcatWorker @@ -28,6 +28,7 @@ class ElasticsearchReleaseWorker(FatcatWorker): def run(self): consume_topic = self.kafka.topics[self.consume_topic] + ac = ApiClient() consumer = consume_topic.get_balanced_consumer( consumer_group=self.consumer_group, @@ -40,7 +41,7 @@ class ElasticsearchReleaseWorker(FatcatWorker): for msg in consumer: json_str = msg.value.decode('utf-8') - release = entity_from_json(json_str, ReleaseEntity) + release = entity_from_json(json_str, ReleaseEntity, api_client=ac) #print(release) elasticsearch_endpoint = "{}/{}/release/{}".format( self.elasticsearch_backend, |