MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / _parse_args

Function _parse_args

scripts/cron_wrapper.py:65–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64
65def _parse_args():
66 _parser = argparse.ArgumentParser(description=__doc__)
67 _parser.add_argument(
68 "-c",
69 "--config",
70 default=DEFAULT_CONFIG_PATH,
71 help=f'Path to cron-wrapper configuration file. Defaults to "{DEFAULT_CONFIG_PATH}"',
72 )
73 _parser.add_argument("monitor_slug", help="Monitor slug of the Sentry cron monitor")
74 _parser.add_argument("script", help="Path to script that will be wrapped and monitored")
75 _parser.add_argument(
76 "script_args",
77 nargs=argparse.REMAINDER,
78 help="Arguments for the wrapped script",
79 )
80 _parser.set_defaults(func=main)
81
82 return _parser
83
84
85if __name__ == "__main__":

Callers 1

cron_wrapper.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected