Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_syncmaster /syncmaster /server /__main__.py
| #!/bin/env python3 | |
| # SPDX-FileCopyrightText: 2023-present MTS PJSC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from __future__ import annotations | |
| import os | |
| import sys | |
| from pathlib import Path | |
| import uvicorn | |
| here = Path(__file__).resolve() | |
| def main(prog_name: str | None = None, args: list[str] | None = None): | |
| """Run uvicorn and pass the command line arguments to it.""" | |
| if args is None: | |
| args = sys.argv.copy() | |
| prog_name = args.pop(0) | |
| if not prog_name: | |
| prog_name = os.fspath(here) | |
| args = args.copy() | |
| # prepend config path before command line arguments | |
| args.insert(0, "--factory") | |
| args.insert(1, "syncmaster.server:get_application") | |
| # call uvicorn | |
| uvicorn.main.main(args=args, prog_name=prog_name) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 800 Bytes
- Xet hash:
- d734d46641fce9198af5436dc17992d3fedc496341dbecfed8b63b00549b44fd
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.