From 8d956a3280e681b479506d1b6adab1756aca0bcc Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 13 Nov 2018 20:24:00 -0800 Subject: elasticsearch config for worker --- python/fatcat_worker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/fatcat_worker.py b/python/fatcat_worker.py index 0bc9963c..611c8e1b 100755 --- a/python/fatcat_worker.py +++ b/python/fatcat_worker.py @@ -21,7 +21,8 @@ def run_entity_updates_worker(args): def run_elastic_release_worker(args): consume_topic = "fatcat-{}.release-updates".format(args.env) worker = FatcatElasticReleaseWorker(args.kafka_hosts, - consume_topic) + consume_topic, elastic_backend=args.elastic_backend, + elastic_index=args.elastic_index) worker.run() def main(): @@ -51,6 +52,12 @@ def main(): sub_elastic_release = subparsers.add_parser('elastic-release') sub_elastic_release.set_defaults(func=run_elastic_release_worker) + sub_elastic_release.add_argument('--elastic-backend', + help="elasticsearch backend to connect to", + default="http://localhost:9200") + sub_elastic_release.add_argument('--elastic-index', + help="elasticsearch index to push into", + default="fatcat") args = parser.parse_args() if not args.__dict__.get("func"): -- cgit v1.2.3