diff --git a/dmoj/settings.py b/dmoj/settings.py index 695b7eb89..79ddbda78 100755 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -682,7 +682,7 @@ BRIDGED_JUDGE_PROXIES = None BRIDGED_DJANGO_ADDRESS = [('localhost', 9998)] BRIDGED_DJANGO_CONNECT = None -BRIDGED_MONITOR_UPDATE_URL = 'http://localhost:9990/update/problems' +BRIDGED_MONITOR_UPDATE_URL = None # Event Server configuration EVENT_DAEMON_USE = False diff --git a/judge/views/problem_transfer.py b/judge/views/problem_transfer.py index 966620a04..3ca398633 100644 --- a/judge/views/problem_transfer.py +++ b/judge/views/problem_transfer.py @@ -182,12 +182,13 @@ def import_problem(self, user_id, problem, new_code): revisions.set_comment(_('Imported from %s%s') % ( settings.VNOJ_PROBLEM_IMPORT_HOST, reverse('problem_detail', args=(old_code,)))) url = settings.BRIDGED_MONITOR_UPDATE_URL - logger.info('Pinging for problem update: %s', url) - try: - with closing(urlopen(url, data=b'')) as f: - f.read() - except Exception: - logger.exception('Failed to ping for problem update: %s', url) + if url: + logger.info('Pinging for problem update: %s', url) + try: + with closing(urlopen(url, data=b'')) as f: + f.read() + except Exception: + logger.exception('Failed to ping for problem update: %s', url) class ProblemImportView(TitleMixin, FormView):