Catch DBConnectionError when update target data
This patch catches DBConnectionError Exception when it occurs during database update with target data. Change-Id: Ibf8a16f152bd683dc36d638963f3dd774e269852
This commit is contained in:
parent
eaa3716838
commit
8f0180542d
|
@ -26,6 +26,7 @@ from urllib2 import HTTPError
|
|||
|
||||
import datetime
|
||||
import json
|
||||
import oslo_db
|
||||
import oslo_messaging as messaging
|
||||
import urllib2
|
||||
import uuid
|
||||
|
@ -107,6 +108,10 @@ class ListenerQueueHandler(object):
|
|||
LOG.info('RDS Listener status %s ' % status)
|
||||
LOG.info('RDS Listener status code %s ' % status_code)
|
||||
db_api.update_target_data(template_status_id, status, **args)
|
||||
try:
|
||||
db_api.update_target_data(template_status_id, status, **args)
|
||||
except oslo_db.exception.DBConnectionError as dbex:
|
||||
LOG.error('DBConnectionError in invoke_listener_rpc %r' % dbex)
|
||||
|
||||
|
||||
class NotifierController(object):
|
||||
|
|
Loading…
Reference in New Issue