diff --git a/sorteerhoed/HITStore.py b/sorteerhoed/HITStore.py index 20ed307..8e7d6d6 100644 --- a/sorteerhoed/HITStore.py +++ b/sorteerhoed/HITStore.py @@ -166,7 +166,7 @@ class Store: return self.getAvgDurationOfPreviousNHits(5) def getHitTimeout(self): - return max(300, self.getAvgDurationOfPreviousNHits(5)*2) + return max(200, self.getAvgDurationOfPreviousNHits(5)*2) def getHITs(self, n = 100): return self.session.query(HIT).\ diff --git a/sorteerhoed/central_management.py b/sorteerhoed/central_management.py index ec06296..baecde6 100644 --- a/sorteerhoed/central_management.py +++ b/sorteerhoed/central_management.py @@ -131,7 +131,11 @@ class CentralManagement(): HITId=self.currentHit.hit_id, ExpireAt=datetime.datetime.fromisoformat('2015-01-01') ) - self.mturk.delete_hit(HITId=self.currentHit.hit_id) + try: + self.mturk.delete_hit(HITId=self.currentHit.hit_id) + except Exception as e: + self.logger.exception(e) + def eventListener(self): while self.isRunning.is_set(): try: @@ -276,7 +280,7 @@ class CentralManagement(): question = open(self.config['amazon']['task_xml'], mode='r').read().replace("{HIT_NR}",str(self.currentHit.id)) estimatedHitDuration = self.store.getEstimatedHitDuration() - fee = max(.2, (self.config['hour_rate_aim']/3600.) * estimatedHitDuration) + fee = max(.25, (self.config['hour_rate_aim']/3600.) * estimatedHitDuration) self.currentHit.fee = fee self.logger.info(f"Based on average duration of {estimatedHitDuration} fee should be {fee}/hit to get hourly rate of {self.config['hour_rate_aim']}") new_hit = self.mturk.create_hit(