Ver Fonte

Make sure all fds are removed from the hub when process is cleaned up.

Ionel Cristian Mărieș há 11 anos atrás
pai
commit
d3674b6913
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      celery/concurrency/asynpool.py

+ 6 - 0
celery/concurrency/asynpool.py

@@ -571,6 +571,12 @@ class AsynPool(_pool.Pool):
                 busy_workers.discard(inq)
             hub_remove(proc.sentinel)
             waiting_to_start.discard(proc)
+            hub_remove(proc.inqW_fd)
+            hub_remove(proc.outqR_fd)
+            if proc.synqR_fd:
+                hub_remove(proc.synqR_fd)
+            if proc.synqW_fd:
+                hub_remove(proc.synqW_fd)
         self.on_process_down = on_process_down
 
     def _create_write_handlers(self, hub,