aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-13 20:24:00 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-13 20:24:00 -0800
commit8d956a3280e681b479506d1b6adab1756aca0bcc (patch)
tree6e7414314e976bfb255b5576f4a0e4a85277bb29
parent0b4bf342716cae68786598a7b2ffcfc4c93ee153 (diff)
downloadfatcat-8d956a3280e681b479506d1b6adab1756aca0bcc.tar.gz
fatcat-8d956a3280e681b479506d1b6adab1756aca0bcc.zip
elasticsearch config for worker
-rwxr-xr-xpython/fatcat_worker.py9
1 files changed, 8 insertions, 1 deletions
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"):