Skip to content

Commit 4bd14ca

Browse files
authored
šŸ›Autoscaling script: bugfix, invalid variable (#7639)
1 parent a2e009f commit 4bd14ca

File tree

1 file changed

+6
-1
lines changed
  • scripts/maintenance/computational-clusters/autoscaled_monitor

1 file changed

+6
-1
lines changed

ā€Žscripts/maintenance/computational-clusters/autoscaled_monitor/core.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,11 @@ def _print_summary_as_json(
457457
"user_id": cluster.primary.user_id,
458458
"wallet_id": cluster.primary.wallet_id,
459459
"disk_space": cluster.primary.disk_space.human_readable(),
460-
"last_heartbeat": cluster.primary.last_heartbeat.isoformat(),
460+
"last_heartbeat": (
461+
cluster.primary.last_heartbeat.isoformat()
462+
if cluster.primary.last_heartbeat
463+
else "n/a"
464+
),
461465
},
462466
"workers": [
463467
{
@@ -806,6 +810,7 @@ async def terminate_dynamic_instances(
806810
rich.print("no instances found")
807811
raise typer.Exit(1)
808812

813+
assert state.ec2_resource_autoscaling # nosec
809814
_print_dynamic_instances(
810815
dynamic_autoscaled_instances,
811816
state.environment,

0 commit comments

Comments
Ā (0)