소스 검색

Daemon context apparently not reentrant, remove from signal handler.

Ask Solem 15 년 전
부모
커밋
53389beab9
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      celery/bin/celeryd.py

+ 2 - 3
celery/bin/celeryd.py

@@ -263,7 +263,7 @@ def run_worker(concurrency=DAEMON_CONCURRENCY, detach=False,
                                 is_detached=detach)
 
         # Install signal handler that restarts celeryd on SIGHUP
-        install_restart_signal_handler(worker, context)
+        install_restart_signal_handler(worker)
 
         try:
             worker.start()
@@ -282,7 +282,7 @@ def run_worker(concurrency=DAEMON_CONCURRENCY, detach=False,
         raise
 
 
-def install_restart_signal_handler(worker, context):
+def install_restart_signal_handler(worker):
     """Installs a signal handler that restarts the current program
     when it receives the ``SIGHUP`` signal.
     """
@@ -295,7 +295,6 @@ def install_restart_signal_handler(worker, context):
             pid = os.fork()
             if pid:
                 worker.stop()
-                context.close()
                 sys.exit(0)
         else:
             worker.stop()