Skip to content

Commit

Permalink
fix(gc): check for ruuns with running state as well
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshh authored and supersergiy committed Nov 1, 2024
1 parent b375bac commit b2e8259
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zetta_utils/run/gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def _get_current_resources_and_stale_run_ids() -> (
run_resources[str(_resource["run_id"])][_resource_id] = _resource

run_ids = list(run_resources.keys())
runs = RUN_DB.query(column_filter={"state": ["running"]})
run_ids += list(runs.keys())
stale_ids = []
heartbeats = [x.get("heartbeat", 0) for x in RUN_DB[(run_ids, ("heartbeat",))]]
lookback = int(os.environ["EXECUTION_HEARTBEAT_LOOKBACK"])
Expand Down

0 comments on commit b2e8259

Please sign in to comment.