def get_args()

in collection_manager/collection_manager/main.py [0:0]


def get_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(description="Watch the filesystem for new granules, and publish messages to "
                                                 "RabbitMQ whenever they become available.")
    parser.add_argument("--collections-path",
                        help="Absolute path to collections configuration file",
                        metavar="PATH",
                        required=True)
    history_group = parser.add_mutually_exclusive_group(required=True)
    history_group.add_argument("--history-path",
                               metavar="PATH",
                               help="Absolute path to ingestion history local directory")
    history_group.add_argument("--history-url",
                               metavar="URL",
                               help="URL to ingestion history solr database")
    parser.add_argument('--rabbitmq-host',
                        default='localhost',
                        metavar='HOST',
                        help='RabbitMQ hostname to connect to. (Default: "localhost")')
    parser.add_argument('--rabbitmq-username',
                        default='guest',
                        metavar='USERNAME',
                        help='RabbitMQ username. (Default: "guest")')
    parser.add_argument('--rabbitmq-password',
                        default='guest',
                        metavar='PASSWORD',
                        help='RabbitMQ password. (Default: "guest")')
    parser.add_argument('--rabbitmq-queue',
                        default="nexus",
                        metavar="QUEUE",
                        help='Name of the RabbitMQ queue to consume from. (Default: "nexus")')
    parser.add_argument('--refresh',
                        default='30',
                        metavar="INTERVAL",
                        help='Number of seconds after which to reload the collections config file. (Default: 30)')
    parser.add_argument('--s3-bucket',
                        metavar='S3-BUCKET',
                        help='Optional name of an AWS S3 bucket where granules are stored. If this option is set, then all collections to be scanned must have their granules on S3, not the local filesystem.')

    return parser.parse_args()