Make use of new keepalive messages from ansible-runner

Make setting API configurable and process keepalive events
  when seen in the event callback

Use env var in pod spec and make it specific to K8S
This commit is contained in:
Alan Rominger
2023-02-20 09:56:38 -05:00
parent ccaace8b30
commit d5de1f9d11
4 changed files with 21 additions and 0 deletions

View File

@@ -85,6 +85,8 @@ class RunnerCallback:
# which generate job events from two 'streams':
# ansible-inventory and the awx.main.commands.inventory_import
# logger
if event_data.get('event') == 'keepalive':
return
if event_data.get(self.event_data_key, None):
if self.event_data_key != 'job_id':