mirror of https://github.com/devine-dl/devine.git
Print traceback when download worker fails
This commit is contained in:
parent
f4363ae57e
commit
47448aac3c
|
@ -7,6 +7,7 @@ import random
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from concurrent import futures
|
from concurrent import futures
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
@ -480,6 +481,7 @@ class dl:
|
||||||
if e:
|
if e:
|
||||||
self.DL_POOL_STOP.set()
|
self.DL_POOL_STOP.set()
|
||||||
pool.shutdown(wait=False, cancel_futures=True)
|
pool.shutdown(wait=False, cancel_futures=True)
|
||||||
|
traceback.print_exception(e)
|
||||||
self.log.error(f"Download worker threw an unhandled exception: {e!r}")
|
self.log.error(f"Download worker threw an unhandled exception: {e!r}")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue