Jelajahi Sumber

[asynpool] Include exception/traceback in "process inqueue damaged" error

Ask Solem 9 tahun lalu
induk
melakukan
437fbed2c7
1 mengubah file dengan 5 tambahan dan 4 penghapusan
  1. 5 4
      celery/concurrency/asynpool.py

+ 5 - 4
celery/concurrency/asynpool.py

@@ -792,8 +792,9 @@ class AsynPool(_pool.Pool):
             append_message(job)
         self._quick_put = send_job
 
-        def on_not_recovering(proc, fd, job):
-            error('Process inqueue damaged: %r %r' % (proc, proc.exitcode))
+        def on_not_recovering(proc, fd, job, exc):
+            error('Process inqueue damaged: %r %r: %r',
+                  proc, proc.exitcode, exc, exc_info=1))
             if proc._is_alive():
                 proc.terminate()
             hub.remove(fd)
@@ -822,7 +823,7 @@ class AsynPool(_pool.Pool):
                         # suspend until more data
                         errors += 1
                         if errors > 100:
-                            on_not_recovering(proc, fd, job)
+                            on_not_recovering(proc, fd, job, exc)
                             raise StopIteration()
                         yield
                     else:
@@ -838,7 +839,7 @@ class AsynPool(_pool.Pool):
                         # suspend until more data
                         errors += 1
                         if errors > 100:
-                            on_not_recovering(proc, fd, job)
+                            on_not_recovering(proc, fd, job, exc)
                             raise StopIteration()
                         yield
                     else: