mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-22 05:01:26 +00:00
Add start indicators to Temporal workers and misc small fixes
This commit is contained in:
parent
9381c99f01
commit
f27b5d354d
@ -43,7 +43,7 @@ async def run():
|
|||||||
@click.command()
|
@click.command()
|
||||||
def main():
|
def main():
|
||||||
Info("apollorhworker", "apollo2")
|
Info("apollorhworker", "apollo2")
|
||||||
Logger()
|
Logger().info("Starting apollo-rhworker")
|
||||||
asyncio.run(run())
|
asyncio.run(run())
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ from apollo.rpmworker.temporal import TASK_QUEUE
|
|||||||
from common.database import Database
|
from common.database import Database
|
||||||
from common.info import Info
|
from common.info import Info
|
||||||
from common.temporal import Temporal
|
from common.temporal import Temporal
|
||||||
|
from common.logger import Logger
|
||||||
|
|
||||||
|
|
||||||
async def run():
|
async def run():
|
||||||
@ -44,6 +45,7 @@ async def run():
|
|||||||
@click.command()
|
@click.command()
|
||||||
def main():
|
def main():
|
||||||
Info("apollorpmworker", "apollo2")
|
Info("apollorpmworker", "apollo2")
|
||||||
|
Logger().info("Starting apollo-rpmworker")
|
||||||
asyncio.run(run())
|
asyncio.run(run())
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ def fastapi_binary(name, image_name, path, port, deps = [], tags = [], **kwargs)
|
|||||||
name = "{}.image".format(name),
|
name = "{}.image".format(name),
|
||||||
srcs = ["@pypi_hypercorn//:rules_python_wheel_entry_point_hypercorn.py"],
|
srcs = ["@pypi_hypercorn//:rules_python_wheel_entry_point_hypercorn.py"],
|
||||||
main = "@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__"],
|
visibility = ["//:__subpackages__"],
|
||||||
deps = deps + [
|
deps = deps + [
|
||||||
":{}_lib".format(name),
|
":{}_lib".format(name),
|
||||||
|
@ -48,7 +48,7 @@ class Info:
|
|||||||
|
|
||||||
def temporal_host(self):
|
def temporal_host(self):
|
||||||
if is_k8s():
|
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:
|
else:
|
||||||
return os.environ.get("TEMPORAL_HOSTPORT", "localhost:7233")
|
return os.environ.get("TEMPORAL_HOSTPORT", "localhost:7233")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user