Skip to content
Snippets Groups Projects
Commit 5f4433fe authored by Martin Mareš's avatar Martin Mareš
Browse files

Export na web nespadne, pokud není nakonfigurován

Closes #312.
parent 9c79e07e
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ import mo.config as config ...@@ -13,7 +13,7 @@ import mo.config as config
import mo.db as db import mo.db as db
from mo.jobs import TheJob, job_handler from mo.jobs import TheJob, job_handler
from mo.score import Score, ScoreResult from mo.score import Score, ScoreResult
from mo.util import tex_arg, assert_not_none from mo.util import tex_arg, assert_not_none, logger
from mo.util_format import format_decimal from mo.util_format import format_decimal
...@@ -267,6 +267,10 @@ def api_params(contest: db.Contest) -> Dict[str, Any]: ...@@ -267,6 +267,10 @@ def api_params(contest: db.Contest) -> Dict[str, Any]:
def schedule_export_score_to_mo_web(contest: db.Contest, score_table: db.ScoreTable) -> None: def schedule_export_score_to_mo_web(contest: db.Contest, score_table: db.ScoreTable) -> None:
if not hasattr(config, 'MO_WEB_SERVER'):
logger.warning('Export výsledkové listiny na web není nakonfigurován')
return
the_job = TheJob() the_job = TheJob()
job = the_job.create(db.JobType.export_score_to_mo_web, db.get_system_user(), priority=1) job = the_job.create(db.JobType.export_score_to_mo_web, db.get_system_user(), priority=1)
job.description = f'Publikování výsledkové listiny {contest.round.round_code_short()} {contest.place.name_locative()} na webu MO' job.description = f'Publikování výsledkové listiny {contest.round.round_code_short()} {contest.place.name_locative()} na webu MO'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment