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 21:58:49 UTC

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

o-nikolas commented on a change in pull request #21191:
URL: https://github.com/apache/airflow/pull/21191#discussion_r796099018



##########
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:
       +1 to this change, Airflow logs are quite full of negative logging which border on spam IMHO. I've recently moved some to debug and got rid of others altogether (depending on the usefulness of the message in question).
    
   Note: could this not just be simplified to:
   ```suggestion
                   if self.triggers:
                       self.log.info("%i triggers currently running", 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