You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/31 22:17:07 UTC

[GitHub] [airflow] malthe commented on a change in pull request #21191: Log trigger status only if at least one is running

malthe commented on a change in pull request #21191:
URL: https://github.com/apache/airflow/pull/21191#discussion_r796110041



##########
File path: airflow/jobs/triggerer_job.py
##########
@@ -245,9 +245,11 @@ async def arun(self):
             await self.cleanup_finished_triggers()
             # Sleep for a bit
             await asyncio.sleep(1)
-            # Every minute, log status
+            # Every minute, log status if at least one trigger is running.
             if time.time() - last_status >= 60:
-                self.log.info("%i triggers currently running", len(self.triggers))
+                count = len(self.triggers)
+                if count > 0:
+                    self.log.info("%i triggers currently running", count)

Review comment:
       But then you don't get an assignment to `count` –  !




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org