Merge "API: Add exception logging for gearman threads"
This commit is contained in:
@@ -39,6 +39,7 @@ def submit_job(job_type, host, data, lbid):
|
|||||||
|
|
||||||
|
|
||||||
def client_job(logger, job_type, host, data, lbid):
|
def client_job(logger, job_type, host, data, lbid):
|
||||||
|
try:
|
||||||
client = GearmanClientThread(logger, host, lbid)
|
client = GearmanClientThread(logger, host, lbid)
|
||||||
if job_type == 'UPDATE':
|
if job_type == 'UPDATE':
|
||||||
client.send_update(data)
|
client.send_update(data)
|
||||||
@@ -46,6 +47,8 @@ def client_job(logger, job_type, host, data, lbid):
|
|||||||
client.send_delete(data)
|
client.send_delete(data)
|
||||||
if job_type == 'ARCHIVE':
|
if job_type == 'ARCHIVE':
|
||||||
client.send_archive(data)
|
client.send_archive(data)
|
||||||
|
except:
|
||||||
|
logger.exception("Gearman thread unhandled exception")
|
||||||
|
|
||||||
|
|
||||||
class GearmanClientThread(object):
|
class GearmanClientThread(object):
|
||||||
|
Reference in New Issue
Block a user