Skip to content
Snippets Groups Projects

Send Kafka notifications when correction is complete

Merged Thomas Kluyver requested to merge send-kafka into master
All threads resolved!
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
+ 2
1
@@ -8,7 +8,7 @@ parser = argparse.ArgumentParser(
description='Update run status at MDC for a given run id.')
parser.add_argument('--conf-file', type=str, help='Path to webservice config',
default=osp.join(osp.dirname(__file__), 'webservice.yaml'))
parser.add_argument('--flg', type=str, choices=["NA", "R", "A"],
parser.add_argument('--flg', type=str, choices=["NA", "R", "A"], required=True,
help='Status flag for MDC request: NA - not available, R - running, A - available.') # noqa
parser.add_argument('--rid', type=int, help='Run id from MDC')
parser.add_argument('--msg', type=str, help='Message string to MDC',
@@ -33,6 +33,7 @@ client_conn = MetadataClient(client_id=mdconf['user-id'],
scope=mdconf['scope'],
base_api_url=mdconf['base-api-url'])
print(f"Updating run {rid} to status {flg} at {mdconf['base-api-url']}")
response = client_conn.update_run_api(rid, {'flg_cal_data_status': flg,
'cal_pipeline_reply': msg})
Loading