diff --git a/apollo/rhworker/__main__.py b/apollo/rhworker/__main__.py index 254b74c..a46f362 100644 --- a/apollo/rhworker/__main__.py +++ b/apollo/rhworker/__main__.py @@ -43,7 +43,7 @@ async def run(): @click.command() def main(): Info("apollorhworker", "apollo2") - Logger() + Logger().info("Starting apollo-rhworker") asyncio.run(run()) diff --git a/apollo/rpmworker/__main__.py b/apollo/rpmworker/__main__.py index 7e0e0b2..d4958f9 100644 --- a/apollo/rpmworker/__main__.py +++ b/apollo/rpmworker/__main__.py @@ -15,6 +15,7 @@ from apollo.rpmworker.temporal import TASK_QUEUE from common.database import Database from common.info import Info from common.temporal import Temporal +from common.logger import Logger async def run(): @@ -44,6 +45,7 @@ async def run(): @click.command() def main(): Info("apollorpmworker", "apollo2") + Logger().info("Starting apollo-rpmworker") asyncio.run(run()) diff --git a/build/macros/fastapi.bzl b/build/macros/fastapi.bzl index f9eed8f..a6298aa 100644 --- a/build/macros/fastapi.bzl +++ b/build/macros/fastapi.bzl @@ -22,7 +22,7 @@ def fastapi_binary(name, image_name, path, port, deps = [], tags = [], **kwargs) name = "{}.image".format(name), srcs = ["@pypi_hypercorn//:rules_python_wheel_entry_point_hypercorn.py"], main = "@pypi_hypercorn//:rules_python_wheel_entry_point_hypercorn.py", - args = ["{}:app".format(path), "--bind 127.0.0.1:{}".format(port)], + args = ["{}:app".format(path)], visibility = ["//:__subpackages__"], deps = deps + [ ":{}_lib".format(name), diff --git a/common/info.py b/common/info.py index 5013759..bbdca33 100644 --- a/common/info.py +++ b/common/info.py @@ -48,7 +48,7 @@ class Info: def temporal_host(self): if is_k8s(): - return "workflow-temporal-frontend.workflow.svc.cluster.local:7233" + return os.environ.get("TEMPORAL_HOSTPORT", "workflow-temporal-frontend.workflow.svc.cluster.local:7233") else: return os.environ.get("TEMPORAL_HOSTPORT", "localhost:7233")