Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
5f4433fe
Commit
5f4433fe
authored
2 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/jobs/score.py
+5
-1
5 additions, 1 deletion
mo/jobs/score.py
with
5 additions
and
1 deletion
mo/jobs/score.py
+
5
−
1
View file @
5f4433fe
...
@@ -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
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment