mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 21:49:27 -02:30
Merge pull request #3044 from ryanpetrello/dispatcher-reap-db-error
detect dead DB connections in the dispatcher when reaping jobs
Reviewed-by: Chris Meyers
https://github.com/chrismeyersfsu
This commit is contained in:
@@ -373,6 +373,10 @@ class AutoscalePool(WorkerPool):
|
|||||||
# don't use our logger (it accesses the database for configuration)
|
# don't use our logger (it accesses the database for configuration)
|
||||||
_, _, tb = sys.exc_info()
|
_, _, tb = sys.exc_info()
|
||||||
traceback.print_tb(tb)
|
traceback.print_tb(tb)
|
||||||
|
for conn in connections.all():
|
||||||
|
# If the database connection has a hiccup, re-establish a new
|
||||||
|
# connection
|
||||||
|
conn.close_if_unusable_or_obsolete()
|
||||||
|
|
||||||
def up(self):
|
def up(self):
|
||||||
if self.full:
|
if self.full:
|
||||||
|
|||||||
Reference in New Issue
Block a user