Browse Source

merge broke shutdown

Ask Solem 12 years ago
parent
commit
401ed63927
1 changed files with 3 additions and 3 deletions
  1. 3 3
      celery/apps/worker.py

+ 3 - 3
celery/apps/worker.py

@@ -300,9 +300,9 @@ def _shutdown_handler(worker, sig='TERM', how='Warm', exc=SystemExit,
                 if callback:
                     callback(worker)
                     safe_say('celeryd: %s shutdown (MainProcess)' % how)
-                if active_thread_count() > 1:
-                    setattr(state, {'Warm': 'should_stop',
-                                    'Cold': 'should_terminate'}[how], True)
+            if active_thread_count() > 1:
+                setattr(state, {'Warm': 'should_stop',
+                                'Cold': 'should_terminate'}[how], True)
             else:
                 raise exc()
         finally: