Permalink
Browse files

Added expire_hit function to mturk. Patch supplied by thecleanmachine…

…. Fixes issue 303
  • Loading branch information...
1 parent 75b1eec commit 597614d6378dbe0a84e95303a0911b5b91ad5af4 jdennis committed Dec 3, 2009
Showing with 15 additions and 0 deletions.
  1. +15 −0 boto/mturk/connection.py
View
15 boto/mturk/connection.py
@@ -312,6 +312,21 @@ def dispose_hit(self, hit_id):
params = {'HITId' : hit_id,}
return self._process_request('DisposeHIT', params)
+ def expire_hit(self, hit_id):
+
+ """
+ Expire a HIT that is no longer needed.
+
+ The effect is identical to the HIT expiring on its own. The HIT no longer appears on the
+ Mechanical Turk web site, and no new Workers are allowed to accept the HIT. Workers who
+ have accepted the HIT prior to expiration are allowed to complete it or return it, or
+ allow the assignment duration to elapse (abandon the HIT). Once all remaining assignments
+ have been submitted, the expired HIT becomes "reviewable", and will be returned by a call
+ to GetReviewableHITs.
+ """
+ params = {'HITId' : hit_id,}
+ return self._process_request('ForceExpireHIT', params)
+
def extend_hit(self, hit_id, assignments_increment=None, expiration_increment=None):
"""
Increase the maximum number of assignments, or extend the expiration date, of an existing HIT.

0 comments on commit 597614d

Please sign in to comment.