mirror of
https://github.com/paulscherrerinstitute/sf_daq_broker.git
synced 2026-06-07 10:28:39 +02:00
consistent argparse help
This commit is contained in:
@@ -51,11 +51,11 @@ def start_server(broker_url, rest_port):
|
||||
|
||||
|
||||
def run():
|
||||
parser = argparse.ArgumentParser(description="sf_daq_broker")
|
||||
parser = argparse.ArgumentParser(description="sf-daq broker")
|
||||
|
||||
parser.add_argument("--broker_url", default=broker_config.DEFAULT_BROKER_URL, help="Message broker URL")
|
||||
parser.add_argument("--broker_url", default=broker_config.DEFAULT_BROKER_URL, help="RabbitMQ broker URL")
|
||||
parser.add_argument("--rest_port", default=config.DEFAULT_BROKER_REST_PORT, type=int, help="REST-API port")
|
||||
parser.add_argument("--log_level", default=config.DEFAULT_LOG_LEVEL, choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], help="Log level")
|
||||
parser.add_argument("--log_level", default=config.DEFAULT_LOG_LEVEL, choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], help="log level")
|
||||
|
||||
clargs = parser.parse_args()
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ def start_server(rest_port):
|
||||
|
||||
|
||||
def run():
|
||||
parser = argparse.ArgumentParser(description="detector_settings")
|
||||
parser = argparse.ArgumentParser(description="detector settings")
|
||||
|
||||
parser.add_argument("--rest_port", default=10003, type=int, help="REST-API port")
|
||||
parser.add_argument("--log_level", default="INFO", choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], help="Log level")
|
||||
parser.add_argument("--log_level", default="INFO", choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], help="log level")
|
||||
|
||||
clargs = parser.parse_args()
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ def connect_to_broker(broker_url):
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Connect and listen to broker events.")
|
||||
parser = argparse.ArgumentParser(description="connect and listen to broker events")
|
||||
parser.add_argument("--broker_url", default=broker_config.DEFAULT_BROKER_URL, help="RabbitMQ broker URL")
|
||||
|
||||
clargs = parser.parse_args()
|
||||
|
||||
@@ -34,7 +34,7 @@ WRITERS = {
|
||||
}
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser = argparse.ArgumentParser(description="post retrieve")
|
||||
|
||||
parser.add_argument("run_info", help="run_info json file")
|
||||
parser.add_argument("--source", "-s", default="image", choices=ALLOWED_SOURCES, help=f"retrieve from image or data buffer (possible values: {PRINTABLE_ALLOWED_SOURCES})")
|
||||
|
||||
@@ -296,10 +296,10 @@ def start_service(broker_url, writer_type=0):
|
||||
def run():
|
||||
parser = argparse.ArgumentParser(description="data writer")
|
||||
|
||||
parser.add_argument("--broker_url", default=broker_config.DEFAULT_BROKER_URL, help="Address of the broker to connect to.")
|
||||
parser.add_argument("--log_level", default="INFO", choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], help="Log level to use.")
|
||||
parser.add_argument("--writer_id", default=1, type=int, help="Id of the writer")
|
||||
parser.add_argument("--writer_type", default=0, type=int, help="Type of the writer (0-epics/bs/camera; 1 - detector retrieve; 2 - detector conversion; 3 - pedestal)")
|
||||
parser.add_argument("--broker_url", default=broker_config.DEFAULT_BROKER_URL, help="RabbitMQ broker URL")
|
||||
parser.add_argument("--log_level", default="INFO", choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], help="log level")
|
||||
parser.add_argument("--writer_id", default=1, type=int, help="writer ID")
|
||||
parser.add_argument("--writer_type", default=0, type=int, choices=range(4), help="writer type (0: epics/BS/camera; 1: detector retrieve; 2: detector conversion; 3: pedestal)")
|
||||
|
||||
clargs = parser.parse_args()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user