Skip to content

Commit

Permalink
passing allow_repeats to the adserver
Browse files Browse the repository at this point in the history
  • Loading branch information
deargle committed Feb 8, 2017
1 parent d00b571 commit 0027258
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion psiturk/psiturk_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,12 @@ def create_psiturk_ad(self):
else:
ip_address = str(self.web_services.get_my_ip())
port = str(self.config.get('Server Parameters', 'port'))

if self.config.has_option('HIT Configuration', 'allow_repeats'):
allow_repeats = self.config.getboolean('HIT Configuration', 'allow_repeats')
else:
allow_repeats = False

ad_content = {
'psiturk_external': True,
'server': ip_address,
Expand All @@ -1144,7 +1150,8 @@ def create_psiturk_ad(self):
'experiment_name': str(self.config.get('HIT Configuration', 'title')),
'contact_email_on_error': str(self.config.get('HIT Configuration', 'contact_email_on_error')),
'ad_group': str(self.config.get('HIT Configuration', 'ad_group')),
'keywords': str(self.config.get('HIT Configuration', 'psiturk_keywords'))
'keywords': str(self.config.get('HIT Configuration', 'psiturk_keywords')),
'allow_repeats': int(allow_repeats)
}
ad_id = self.web_services.create_ad(ad_content)
return ad_id
Expand Down

0 comments on commit 0027258

Please sign in to comment.