Skip to content

Commit

Permalink
Clean more stale origins (#3561)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Klopper <[email protected]>
  • Loading branch information
originalsouth and underdarknl authored Sep 23, 2024
1 parent f050330 commit b49e28f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions octopoes/octopoes/core/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ def save_origin(
self.ooi_repository.save(ooi, valid_time=valid_time, end_valid_time=end_valid_time)
self.origin_repository.save(origin, valid_time=valid_time)

# Origins that are stale need to be deleted. #3561
if not origin.result and origin.origin_type != OriginType.INFERENCE:
self.origin_repository.delete(origin, valid_time=valid_time)

def _run_inference(self, origin: Origin, valid_time: datetime) -> None:
bit_definition = get_bit_definitions().get(origin.method, None)

Expand Down

0 comments on commit b49e28f

Please sign in to comment.