Explorar o código

Remove billiard C extension maxtasks warning

Ask Solem %!s(int64=11) %!d(string=hai) anos
pai
achega
0040507465
Modificáronse 1 ficheiros con 0 adicións e 14 borrados
  1. 0 14
      celery/concurrency/prefork.py

+ 0 - 14
celery/concurrency/prefork.py

@@ -9,7 +9,6 @@
 from __future__ import absolute_import
 
 import os
-import sys
 
 from billiard import forking_enable
 from billiard.pool import RUN, CLOSE, Pool as BlockingPool
@@ -37,11 +36,6 @@ WORKER_SIGRESET = frozenset(['SIGTERM',
 #: List of signals to ignore when a child process starts.
 WORKER_SIGIGNORE = frozenset(['SIGINT'])
 
-MAXTASKS_NO_BILLIARD = """\
-    maxtasksperchild enabled but billiard C extension not installed!
-    This may lead to a deadlock, so please install the billiard C extension.
-"""
-
 logger = get_logger(__name__)
 warning, debug = logger.warning, logger.debug
 
@@ -108,14 +102,6 @@ class TaskPool(BasePool):
         Will pre-fork all workers so they're ready to accept tasks.
 
         """
-        if self.options.get('maxtasksperchild') and sys.platform != 'win32':
-            try:
-                from billiard.connection import Connection
-                Connection.send_offset
-            except (ImportError, AttributeError):
-                # billiard C extension not installed
-                warning(MAXTASKS_NO_BILLIARD)
-
         forking_enable(self.forking_enable)
         Pool = (self.BlockingPool if self.options.get('threads', True)
                 else self.Pool)