mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
detect dead DB connections in the dispatcher when reaping jobs
This commit is contained in:
parent
18409f89c5
commit
b2442d42a3
@ -373,6 +373,10 @@ class AutoscalePool(WorkerPool):
|
||||
# don't use our logger (it accesses the database for configuration)
|
||||
_, _, tb = sys.exc_info()
|
||||
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):
|
||||
if self.full:
|
||||
|
Loading…
Reference in New Issue
Block a user