summaryrefslogtreecommitdiffstats
path: root/python/fatcat_worker.py
diff options
context:
space:
mode:
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!")