summaryrefslogtreecommitdiffstats
path: root/python/fatcat_worker.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-04 18:52:22 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-04 18:52:22 -0800
commite5486378d8d7adf8974b1f1ebaf0400445ba8791 (patch)
treee4f309802df8450c0eaf02ec634aea311b3804c2 /python/fatcat_worker.py
parent66953b184d9b664e15cd7d7fddcb250c2b767df5 (diff)
downloadfatcat-e5486378d8d7adf8974b1f1ebaf0400445ba8791.tar.gz
fatcat-e5486378d8d7adf8974b1f1ebaf0400445ba8791.zip
elastic release worker
Diffstat (limited to 'python/fatcat_worker.py')
-rwxr-xr-xpython/fatcat_worker.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/fatcat_worker.py b/python/fatcat_worker.py
index cc11beca..50ff0fb7 100755
--- a/python/fatcat_worker.py
+++ b/python/fatcat_worker.py
@@ -3,6 +3,7 @@
import sys
import argparse
from fatcat.changelog_workers import FatcatChangelogWorker, FatcatEntityUpdatesWorker
+from fatcat.elastic_workers import FatcatElasticReleaseWorker
def run_changelog_worker(args):
topic = "fatcat-{}.changelog".format(args.env)
@@ -17,6 +18,12 @@ def run_entity_updates_worker(args):
changelog_topic, release_topic)
worker.run()
+def run_elastic_release_worker(args):
+ consume_topic = "fatcat-{}.release-updates".format(args.env)
+ worker = FatcatElasticReleaseWorker(args.kafka_hosts,
+ consume_topic)
+ worker.run()
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--debug',
@@ -42,6 +49,9 @@ def main():
sub_entity_updates = subparsers.add_parser('entity-updates')
sub_entity_updates.set_defaults(func=run_entity_updates_worker)
+ sub_elastic_release = subparsers.add_parser('elastic-release')
+ sub_elastic_release.set_defaults(func=run_elastic_release_worker)
+
args = parser.parse_args()
if not args.__dict__.get("func"):
print("tell me what to do!")