Add log for thread error on helper_generic file
- Remove if condition for RegExParser
This commit is contained in:
parent
c0036d8c18
commit
7052c734bd
|
@ -1,5 +1,5 @@
|
||||||
"""This module is to perform generic oprations for threading."""
|
"""This module is to perform generic oprations for threading."""
|
||||||
"""and some conversion operations."""
|
"""And some conversion operations."""
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
|
@ -12,6 +12,7 @@ import shared
|
||||||
from debug import logger
|
from debug import logger
|
||||||
import queues
|
import queues
|
||||||
import shutdown
|
import shutdown
|
||||||
|
from debug import logger
|
||||||
|
|
||||||
|
|
||||||
def powQueueSize():
|
def powQueueSize():
|
||||||
|
@ -20,8 +21,8 @@ def powQueueSize():
|
||||||
try:
|
try:
|
||||||
if thread.name == "singleWorker":
|
if thread.name == "singleWorker":
|
||||||
curWorkerQueue += thread.busy
|
curWorkerQueue += thread.busy
|
||||||
except Exception:
|
except Exception as err:
|
||||||
print ""
|
logger.info("Thread error %s", err)
|
||||||
return curWorkerQueue
|
return curWorkerQueue
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,10 +58,6 @@ def signal_handler(signal, frame):
|
||||||
logger.error("Got signal %i in %s/%s", signal,
|
logger.error("Got signal %i in %s/%s", signal,
|
||||||
current_process().name,
|
current_process().name,
|
||||||
threading.current_thread().name)
|
threading.current_thread().name)
|
||||||
if current_process().name == "RegExParser":
|
|
||||||
# on Windows this isn't triggered, but it's fine,
|
|
||||||
# it has its own process termination thing
|
|
||||||
raise SystemExit
|
|
||||||
if "PoolWorker" in current_process().name:
|
if "PoolWorker" in current_process().name:
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
if threading.current_thread().name not in (
|
if threading.current_thread().name not in (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user