This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit cc61e64465df3f0ca487b76af10af12d59da5842
Author: Daniel Gruno <[email protected]>
AuthorDate: Thu Sep 10 10:23:59 2020 +0200

    Exceptions may be thrown when finally fetching result()
---
 server/plugins/offloader.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/server/plugins/offloader.py b/server/plugins/offloader.py
index bd38a0e..0ee9823 100644
--- a/server/plugins/offloader.py
+++ b/server/plugins/offloader.py
@@ -37,7 +37,10 @@ class ExecutorPool:
             print("[Runner] Waiting for task %r to finish" % func)
         while runner.running():
             await asyncio.sleep(0.01)
-        rv = runner.result()
+        try:
+            rv = runner.result()
+        except Exception as e:
+            rv = e
         if DEBUG:
             print("[Runner] Done with task %r, put runner back in queue" % 
func)
         if isinstance(rv, BaseException):

Reply via email to