Initial curated ITWorx_MCP_Hub source from 368fba691ea8d23403b4d56b53b5ec670d7c5020
This commit is contained in:
commit
cb5be898ea
663 files changed
+82674
No files matched your search
@@ -0,0 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
import os
|
||||
|
||||
from packages.hub_runtime import SecretFileError, validate_required_secret_paths
|
||||
|
||||
from .dispatch import service_module
|
||||
|
||||
|
||||
def main() -> None:
|
||||
try:
|
||||
validate_required_secret_paths(os.environ.get("REQUIRED_SECRET_FILES", ""))
|
||||
except (SecretFileError, ValueError):
|
||||
raise SystemExit("required runtime secret validation failed") from None
|
||||
module = importlib.import_module(service_module(os.environ.get("SERVICE_NAME", "")))
|
||||
runner = getattr(module, "run", None)
|
||||
if not callable(runner):
|
||||
raise SystemExit("configured service has no production runner")
|
||||
runner()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user