summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdennis <jdennis@604d75c7-a419-0410-a38f-bde1a0bd1dbf>2009-12-03 19:59:19 +0000
committerjdennis <jdennis@604d75c7-a419-0410-a38f-bde1a0bd1dbf>2009-12-03 19:59:19 +0000
commit597614d6378dbe0a84e95303a0911b5b91ad5af4 (patch)
tree8545dce0b25adacee933b7b43339da7f269052dd
parent75b1eec4c13a8e9019648156cbb8f89bad136a75 (diff)
downloadboto-597614d6378dbe0a84e95303a0911b5b91ad5af4.tar.gz
Added expire_hit function to mturk. Patch supplied by thecleanmachine. Fixes issue 303
-rw-r--r--boto/mturk/connection.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/boto/mturk/connection.py b/boto/mturk/connection.py
index 58f5025c..261e2a78 100644
--- a/boto/mturk/connection.py
+++ b/boto/mturk/connection.py
@@ -312,6 +312,21 @@ class MTurkConnection(AWSQueryConnection):
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.