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

Add debug log saying whats being run to EventScheduler #34808

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion airflow/utils/event_scheduler.py
Expand Up @@ -20,8 +20,10 @@
from sched import scheduler
from typing import Callable

from airflow.utils.log.logging_mixin import LoggingMixin

class EventScheduler(scheduler):

class EventScheduler(scheduler, LoggingMixin):
"""General purpose event scheduler."""

def call_regular_interval(
Expand All @@ -34,6 +36,7 @@ def call_regular_interval(
"""Call a function at (roughly) a given interval."""

def repeat(*args, **kwargs):
self.log.debug("Calling %s", action)
action(*args, **kwargs)
# This is not perfect. If we want a timer every 60s, but action
# takes 10s to run, this will run it every 70s.
Expand Down