[Misc] Print stack trace using logger.exception (#9461)
This commit is contained in:
@@ -3,7 +3,6 @@ import multiprocessing
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
import uuid
|
||||
from dataclasses import dataclass
|
||||
from multiprocessing import Queue
|
||||
@@ -227,10 +226,9 @@ def _run_worker_process(
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
except BaseException as e:
|
||||
tb = traceback.format_exc()
|
||||
logger.error(
|
||||
"Exception in worker %s while processing method %s: %s, %s",
|
||||
process_name, method, e, tb)
|
||||
logger.exception(
|
||||
"Exception in worker %s while processing method %s.",
|
||||
process_name, method)
|
||||
exception = e
|
||||
result_queue.put(
|
||||
Result(task_id=task_id, value=output, exception=exception))
|
||||
|
||||
Reference in New Issue
Block a user