Example #1
0
File: start.py Project: whigg/cate
def main(args=None) -> int:
    return run_start(SERVICE_NAME,
                     'Starts a new {}'.format(SERVICE_TITLE),
                     __version__,
                     application_factory=create_application,
                     log_file_prefix=WEBAPI_LOG_FILE_PREFIX,
                     args=args)
Example #2
0
def main(args=None) -> int:
    return run_start(SERVICE_NAME,
                     'Starts a new {}'.format(SERVICE_TITLE),
                     __version__,
                     application_factory=create_application,
                     log_file_prefix=WEBAPI_LOG_FILE_PREFIX,
                     args=args)
Example #3
0
def main(args=None) -> int:
    if not os.path.exists(DEFAULT_VERSION_DATA_PATH):
        os.makedirs(DEFAULT_VERSION_DATA_PATH, exist_ok=True)
    if not os.path.exists(ENV_LOCATION_FILE):
        with open(ENV_LOCATION_FILE, "w+") as f:
            f.write(sys.prefix)
    return run_start(CLI_NAME,
                     CLI_DESCRIPTION,
                     __version__,
                     application_factory=create_application,
                     log_file_prefix=WEBAPI_LOG_FILE_PREFIX,
                     args=args)