kaxil commented on a change in pull request #17565:
URL: https://github.com/apache/airflow/pull/17565#discussion_r688007747
##########
File path: airflow/jobs/triggerer_job.py
##########
@@ -66,6 +67,15 @@ def register_signals(self) -> None:
signal.signal(signal.SIGINT, self._exit_gracefully)
signal.signal(signal.SIGTERM, self._exit_gracefully)
+ @provide_session
+ def is_needed(self, session) -> bool:
+ """
+ Tests if the triggerer job needs to be run (i.e., if there are triggers
+ in the trigger table).
+ This is used for the warning boxes in the UI.
+ """
+ return session.query(Trigger).count() > 0
Review comment:
yeah
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]