Quellcode durchsuchen

Removes hack fix solved by asynwrite branch

Ask Solem vor 12 Jahren
Ursprung
Commit
96a1136a4a
1 geänderte Dateien mit 0 neuen und 24 gelöschten Zeilen
  1. 0 24
      celery/worker/__init__.py

+ 0 - 24
celery/worker/__init__.py

@@ -48,11 +48,6 @@ TERMINATE = 0x3
 #: Default socket timeout at shutdown.
 SHUTDOWN_SOCKET_TIMEOUT = 5.0
 
-MAXTASKS_NO_BILLIARD = """\
-maxtasksperchild enabled but billiard C extension not installed!
-This may lead to a deadlock, please install the billiard C extension.
-"""
-
 logger = get_logger(__name__)
 
 
@@ -145,25 +140,6 @@ class Pool(bootsteps.StartStopComponent):
             except AttributeError:
                 pass
 
-        # This makes sure the timers are fired even if writing
-        # to the pool inqueue blocks.
-        # XXX Ugly hack to fix #1306 and the worker will still be blocking
-        # but at least it will recover if there are no worker processes
-        # to write to.
-        # This can be fixed properly when we are
-        # able to use the pure-python version of multiprocessing
-        # (celery 3.1+)
-        try:
-            import _billiard
-        except ImportError:
-            # billiard C extension not installed
-            if w.max_tasks_per_child:
-                logger.warning(MAXTASKS_NO_BILLIARD)
-        _quick_put = pool._pool._quick_put
-        def quick_put(obj):
-            _quick_put(obj, hub.maintain_pool)
-        pool._pool._quick_put = quick_put
-
         pool.init_callbacks(
             on_process_up=lambda w: add_reader(w.sentinel, maintain_pool),
             on_process_down=lambda w: remove(w.sentinel),