Pārlūkot izejas kodu

Fix for running celery on windows. Removed reaping of processes if os.kill() function doesn't exist.

Jonatan Heyman 15 gadi atpakaļ
vecāks
revīzija
65da4070be
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 4 3
      celery/pool.py

+ 4 - 3
celery/pool.py

@@ -65,11 +65,12 @@ def process_is_dead(process):
     :returns: ``True`` if the process is not running, ``False`` otherwise.
 
     """
-
+    
     # Try to see if the process is actually running,
     # and reap zombie proceses while we're at it.
-
-    if reap_process(process.pid):
+    # Only do this if os.kill exists. It doesn't on windows.
+    
+    if callable(getattr(os, "kill", None)) and reap_process(process.pid):
         return True
 
     # Then try to ping the process using its pipe.