aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_ingest.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-09-30 15:31:03 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-09-30 15:31:38 -0700
commit519c7e77cf3a54b9620adef07fedac9b37a5f9f2 (patch)
treec5b120c48ed5aaff087984078341cffbae1b30b8 /python/fatcat_ingest.py
parentb5bf0697b3d3b074fd9a6a8836ac114fbd8c1df1 (diff)
downloadfatcat-519c7e77cf3a54b9620adef07fedac9b37a5f9f2.tar.gz
fatcat-519c7e77cf3a54b9620adef07fedac9b37a5f9f2.zip
default ingest request topic now '-daily'; configurable for ingest_tool.py
Diffstat (limited to 'python/fatcat_ingest.py')
-rwxr-xr-xpython/fatcat_ingest.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/fatcat_ingest.py b/python/fatcat_ingest.py
index 1a53a7dc..b62cb8a4 100755
--- a/python/fatcat_ingest.py
+++ b/python/fatcat_ingest.py
@@ -37,7 +37,10 @@ def _run_search_dump(args, search):
print("=== THIS IS A DRY RUN ===")
kafka_producer = None
- ingest_file_request_topic = "sandcrawler-{}.ingest-file-requests".format(args.env)
+ if args.kafka_request_topic:
+ ingest_file_request_topic = args.kafka_request_topic
+ else:
+ ingest_file_request_topic = "sandcrawler-{}.ingest-file-requests-daily".format(args.env)
if args.enqueue_kafka:
print("Will send ingest requests to kafka topic: {}".format(ingest_file_request_topic), file=sys.stderr)
kafka_producer = simple_kafka_producer(args.kafka_hosts)
@@ -185,6 +188,8 @@ def main():
parser.add_argument('--kafka-hosts',
default="localhost:9092",
help="list of Kafka brokers (host/port) to use")
+ parser.add_argument('--kafka-request-topic',
+ help="exact Kafka ingest request topic to use")
parser.add_argument('--elasticsearch-endpoint',
default="https://search.fatcat.wiki",
help="elasticsearch API. internal endpoint preferred, but public is default")