ashb commented on a change in pull request #10956:
URL: https://github.com/apache/airflow/pull/10956#discussion_r499531994
##########
File path: airflow/executors/celery_executor.py
##########
@@ -225,7 +225,15 @@ def _send_tasks_to_celery(self, task_tuples_to_send):
# since tasks are roughly uniform in size
chunksize = self._num_tasks_per_send_process(len(task_tuples_to_send))
num_processes = min(len(task_tuples_to_send), self._sync_parallelism)
- with Pool(processes=num_processes) as send_pool:
+
+ def reset_signals():
+ # Since we are run from inside the SchedulerJob, we don't to
+ # inherit the signal handlers that we registered there.
+ import signal
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
+
+ with Pool(processes=num_processes, initializer=reset_signals) as
send_pool:
Review comment:
Probably yeah. I've never hit it in any other version _that I know of_,
but hit it quite frequently when running in >=2 schedulers, so something about
this PR made it happen with some regularity.
It's already it's own commit
(https://github.com/apache/airflow/pull/10956/commits/1752c1e90fb82e972ae4a608dc8daff500ac67e7)
so yeah, I'll pull this out to its own PR. I wonder if this happens to be the
cause of some of the long-standing "scheduler is alive, but not scheduling
anything anymore" bugs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]