mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
move with block inside of while to free up persistent db connection
Signed-off-by: jessicamack <jmack@redhat.com>
This commit is contained in:
@@ -58,11 +58,11 @@ class Command(BaseCommand):
|
||||
sys.exit(1)
|
||||
|
||||
def do_hearbeat_loop(self):
|
||||
with pg_bus_conn(new_connection=True) as conn:
|
||||
while True:
|
||||
while True:
|
||||
with pg_bus_conn(new_connection=True) as conn:
|
||||
logger.debug('Sending heartbeat')
|
||||
conn.notify('web_heartbeet', self.construct_payload())
|
||||
time.sleep(settings.BROADCAST_WEBSOCKET_BEACON_FROM_WEB_RATE_SECONDS)
|
||||
time.sleep(settings.BROADCAST_WEBSOCKET_BEACON_FROM_WEB_RATE_SECONDS)
|
||||
|
||||
def handle(self, *arg, **options):
|
||||
self.print_banner()
|
||||
|
||||
Reference in New Issue
Block a user