Browse Source

Remove Pool.rlimit_safe attribute, no longer needed

Ask Solem 12 years ago
parent
commit
a1d56c8c82

+ 0 - 5
celery/concurrency/base.py

@@ -38,11 +38,6 @@ class BasePool(object):
     #: a signal handler.
     signal_safe = True
 
-    #: set to true if pool supports rate limits.
-    #: (this is here for gevent, which currently does not implement
-    #: the necessary timers).
-    rlimit_safe = True
-
     #: set to true if pool uses greenlets.
     is_green = False
 

+ 0 - 1
celery/concurrency/eventlet.py

@@ -117,7 +117,6 @@ class Timer(timer2.Timer):
 class TaskPool(base.BasePool):
     Timer = Timer
 
-    rlimit_safe = False
     signal_safe = False
     is_green = True
 

+ 0 - 1
celery/concurrency/gevent.py

@@ -107,7 +107,6 @@ class TaskPool(BasePool):
     Timer = Timer
 
     signal_safe = False
-    rlimit_safe = False
     is_green = True
 
     def __init__(self, *args, **kwargs):

+ 0 - 6
celery/tests/worker/test_worker.py

@@ -1073,12 +1073,6 @@ class test_WorkController(AppCase):
         for step in worker.steps:
             self.assertTrue(step.terminate.call_count)
 
-    def test_Queues_pool_not_rlimit_safe(self):
-        w = Mock()
-        w.pool_cls.rlimit_safe = False
-        components.Queues(w).create(w)
-        self.assertTrue(w.disable_rate_limits)
-
     def test_Queues_pool_no_sem(self):
         w = Mock()
         w.pool_cls.uses_semaphore = False