Add log for thread error on helper_generic file

- Remove if condition for RegExParser
This commit is contained in:
Mahendra 2018-04-06 19:00:32 +05:30
parent c0036d8c18
commit 7052c734bd
No known key found for this signature in database
GPG Key ID: A672D8FAAEE398B3

View File

@ -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 (