aboutsummaryrefslogtreecommitdiff
path: root/jb/flow/maintenance.py
diff options
context:
space:
mode:
authorMax Nanis2026-02-24 17:26:15 -0500
committerMax Nanis2026-02-24 17:26:15 -0500
commit8c1940445503fd6678d0961600f2be81622793a2 (patch)
treeb9173562b8824b5eaa805e446d9d780e1f23fb2a /jb/flow/maintenance.py
parent25d8c3c214baf10f6520cc1351f78473150e5d7a (diff)
downloadamt-jb-8c1940445503fd6678d0961600f2be81622793a2.tar.gz
amt-jb-8c1940445503fd6678d0961600f2be81622793a2.zip
Extensive use of type checking. Movement of pytest conf towards handling managers (for db agnostic unittest). Starting to organize pytests.
Diffstat (limited to 'jb/flow/maintenance.py')
-rw-r--r--jb/flow/maintenance.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/jb/flow/maintenance.py b/jb/flow/maintenance.py
index 5dc9cea..744ed1d 100644
--- a/jb/flow/maintenance.py
+++ b/jb/flow/maintenance.py
@@ -11,16 +11,20 @@ def check_hit_status(
) -> 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.
+ Request information from Amazon regarding the status of a HIT ID. Update
+ the local state from that response.
"""
+
hit_status = AMTManager.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.
+
+ # 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
+ # 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