Apply new rules from black update (#16232)

This commit is contained in:
Alan Rominger
2026-01-19 12:58:07 -05:00
committed by GitHub
parent 43a3a620e3
commit dce5ac73c5
146 changed files with 67 additions and 227 deletions

View File

@@ -776,7 +776,7 @@ def _heartbeat_instance_management():
logger.warning(f'Heartbeat skew - interval={(nowtime - last_last_seen).total_seconds():.4f}, expected={settings.CLUSTER_NODE_HEARTBEAT_PERIOD}')
else:
if settings.AWX_AUTO_DEPROVISION_INSTANCES:
(changed, this_inst) = Instance.objects.register(ip_address=os.environ.get('MY_POD_IP'), node_type='control', node_uuid=settings.SYSTEM_UUID)
changed, this_inst = Instance.objects.register(ip_address=os.environ.get('MY_POD_IP'), node_type='control', node_uuid=settings.SYSTEM_UUID)
if changed:
logger.warning(f'Recreated instance record {this_inst.hostname} after unexpected removal')
this_inst.local_health_check()
@@ -958,10 +958,8 @@ def awx_periodic_scheduler():
continue
if not can_start:
new_unified_job.status = 'failed'
new_unified_job.job_explanation = gettext_noop(
"Scheduled job could not start because it \
was not in the right state or required manual credentials"
)
new_unified_job.job_explanation = gettext_noop("Scheduled job could not start because it \
was not in the right state or required manual credentials")
new_unified_job.save(update_fields=['status', 'job_explanation'])
new_unified_job.websocket_emit_status("failed")
emit_channel_notification('schedules-changed', dict(id=schedule.id, group_name="schedules"))