diff --git a/collect_coordinator/__main__.py b/collect_coordinator/__main__.py index 84f4b56..6291288 100644 --- a/collect_coordinator/__main__.py +++ b/collect_coordinator/__main__.py @@ -147,7 +147,12 @@ async def on_start_stop(_: Application) -> AsyncIterator[None]: def main() -> None: ap = ArgumentParser() ap.add_argument("--namespace", help="The namespace to start the jobs in.", required=True) - ap.add_argument("--debug", action="store_true", help="Enable debug logging") + ap.add_argument( + "--debug", + action="store_true", + help="Enable debug logging", + default=os.environ.get("COORDINATOR_DEBUG", "").lower() == "true", + ) ap.add_argument("--kube-config", help="Optional path to kube config file.") ap.add_argument( "--redis-url-nodb", help="Redis host. Default: redis://localhost:6379", default="redis://localhost:6379" diff --git a/collect_coordinator/worker_queue.py b/collect_coordinator/worker_queue.py index aba0827..78d2355 100644 --- a/collect_coordinator/worker_queue.py +++ b/collect_coordinator/worker_queue.py @@ -62,8 +62,7 @@ def __init__( @timed(module="collect_coordinator", name="collect") async def collect(self, ctx: Dict[Any, Any], *args: Any, **kwargs: Any) -> bool: - # TODO: switch to debug here - log.info(f"Collect function called with ctx: {ctx}, args: {args}, kwargs: {kwargs}") + log.debug(f"Collect function called with ctx: {ctx}, args: {args}, kwargs: {kwargs}") job_id: str = ctx["job_id"] if len(args) == 1 and isinstance(args[0], dict): data = args[0]