Browse Source

context is not available when running in non-daemon mode.

Brian Rosner 16 năm trước cách đây
mục cha
commit
2610b1acf3
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      celery/bin/celeryd.py

+ 2 - 1
celery/bin/celeryd.py

@@ -166,7 +166,8 @@ def run_worker(concurrency=DAEMON_CONCURRENCY, daemon=False,
         emergency_error(logfile, "celeryd raised exception %s: %s\n%s" % (
                             e.__class__, e, traceback.format_exc()))
     except:
-        context.close()
+        if daemon:
+            context.close()
         raise