mirror of
https://github.com/ansible/awx.git
synced 2026-04-06 18:49:21 -02:30
Apply conservative database connection reduction changes (#14066)
This is expected to free up 4 additional database connections per traditional node compare to roughly 12 in total before this change Out of these 3 are accomplished by using existing connection for recently added services then 1 is obtained by closing the connection for the idle callback receiver main process Signed-off-by: jessicamack <jmack@redhat.com> Co-authored-by: jessicamack <jmack@redhat.com>
This commit is contained in:
@@ -143,9 +143,10 @@ class AWXConsumerRedis(AWXConsumerBase):
|
||||
def run(self, *args, **kwargs):
|
||||
super(AWXConsumerRedis, self).run(*args, **kwargs)
|
||||
self.worker.on_start()
|
||||
logger.info(f'Callback receiver started with pid={os.getpid()}')
|
||||
db.connection.close() # logs use database, so close connection
|
||||
|
||||
while True:
|
||||
logger.debug(f'{os.getpid()} is alive')
|
||||
time.sleep(60)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user