From 671a7b1b02503cfa5c9aecd40c27a0c2729a285b Mon Sep 17 00:00:00 2001 From: stuppie Date: Wed, 4 Nov 2026 12:11:03 -0600 Subject: strip out AMT --- jb/flow/maintenance.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 jb/flow/maintenance.py (limited to 'jb/flow/maintenance.py') diff --git a/jb/flow/maintenance.py b/jb/flow/maintenance.py deleted file mode 100644 index 4a2fe81..0000000 --- a/jb/flow/maintenance.py +++ /dev/null @@ -1,31 +0,0 @@ -from jb.decorators import HM -from jb.flow.monitoring import emit_hit_event -from jb.managers.amt import AMTManager -from jb.models.definitions import HitStatus - - -def check_hit_status( - amtm: AMTManager, - amt_hit_id: str, - amt_hit_type_id: str, - reason: str | None = None, -) -> HitStatus: - """ - (this used to be called "process_hit") - Request information from Amazon regarding the status of a HIT ID. Update - the local state from that response. - """ - - hit_status = amtm.get_hit_status(amt_hit_id=amt_hit_id) - - # We're assuming that in the db this Hit is marked as Assignable, or - # else we wouldn't have called this function. - if hit_status != HitStatus.Assignable: - # TODO: should update also assignment_pending_count, - # assignment_available_count, assignment_completed_count - HM.update_status(amt_hit_id=amt_hit_id, hit_status=hit_status) - emit_hit_event( - status=hit_status, amt_hit_type_id=amt_hit_type_id, reason=reason - ) - - return hit_status -- cgit v1.2.3