Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log trigger status only if at least one is running #21191

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions airflow/jobs/triggerer_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
potiuk marked this conversation as resolved.
Show resolved Hide resolved
last_status = time.time()
# Wait for watchdog to complete
await watchdog
Expand Down