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
e9e8c153
Commit
e9e8c153
authored
2 years ago
by
Jiří Setnička
Browse files
Options
Downloads
Patches
Plain Diff
Joby výsledkovek: Vyšší priorita a lepší názvy jobů
Issue
#292
(jména jobů) a
#294
(prioritní joby).
parent
46d00fb7
Branches
Branches containing commit
No related tags found
1 merge request
!124
Zjednodušení práce s joby
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/publish-score
+1
-1
1 addition, 1 deletion
bin/publish-score
mo/jobs/score.py
+7
-7
7 additions, 7 deletions
mo/jobs/score.py
mo/web/org_score.py
+1
-1
1 addition, 1 deletion
mo/web/org_score.py
with
9 additions
and
9 deletions
bin/publish-score
+
1
−
1
View file @
e9e8c153
...
...
@@ -46,7 +46,7 @@ for round in rounds:
print
(
'
Publikoval bych
'
)
else
:
print
(
'
Publikuji
'
)
mo
.
jobs
.
score
.
schedule_export_score_to_mo_web
(
contest
.
scoretable
)
mo
.
jobs
.
score
.
schedule_export_score_to_mo_web
(
contest
,
contest
.
scoretable
)
if
not
args
.
dry_run
:
sess
.
commit
()
This diff is collapsed.
Click to expand it.
mo/jobs/score.py
+
7
−
7
View file @
e9e8c153
...
...
@@ -32,8 +32,8 @@ from mo.util_format import format_decimal
def
schedule_snapshot_score
(
contest
:
db
.
Contest
,
for_user
:
db
.
User
,
snapshot_note
:
str
)
->
None
:
the_job
=
TheJob
()
job
=
the_job
.
create
(
db
.
JobType
.
snapshot_score
,
for_user
)
job
.
description
=
'
Zmrazení aktuálního stavu výsledkové listiny
'
job
=
the_job
.
create
(
db
.
JobType
.
snapshot_score
,
for_user
,
priority
=
1
)
job
.
description
=
f
'
Zmrazení aktuálního stavu výsledkové listiny
{
contest
.
round
.
round_code_short
()
}
{
contest
.
place
.
name_locative
()
}
'
job
.
in_json
=
{
"
contest_id
"
:
contest
.
contest_id
,
"
snapshot_note
"
:
snapshot_note
}
the_job
.
submit
()
...
...
@@ -263,10 +263,10 @@ def api_params(contest: db.Contest) -> Dict[str, Any]:
}
def
schedule_export_score_to_mo_web
(
score_table
:
db
.
ScoreTable
)
->
None
:
def
schedule_export_score_to_mo_web
(
contest
:
db
.
Contest
,
score_table
:
db
.
ScoreTable
)
->
None
:
the_job
=
TheJob
()
job
=
the_job
.
create
(
db
.
JobType
.
export_score_to_mo_web
,
db
.
get_system_user
())
job
.
description
=
'
Publikování výsledkové listiny na webu MO
'
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
.
in_json
=
{
"
scoretable_id
"
:
score_table
.
scoretable_id
}
the_job
.
submit
()
...
...
@@ -423,8 +423,8 @@ def handle_export_score_to_mo_web(the_job: TheJob):
def
schedule_revert_export_score_to_mo_web
(
contest
:
db
.
Contest
)
->
None
:
the_job
=
TheJob
()
job
=
the_job
.
create
(
db
.
JobType
.
revert_export_score_to_mo_web
,
db
.
get_system_user
())
job
.
description
=
'
Zrušení publikování výsledkové listiny na webu MO
'
job
=
the_job
.
create
(
db
.
JobType
.
revert_export_score_to_mo_web
,
db
.
get_system_user
()
,
priority
=
1
)
job
.
description
=
f
'
Zrušení publikování výsledkové listiny
{
contest
.
round
.
round_code_short
()
}
{
contest
.
place
.
name_locative
()
}
na webu MO
'
job
.
in_json
=
{
"
contest_id
"
:
contest
.
contest_id
}
the_job
.
submit
()
...
...
This diff is collapsed.
Click to expand it.
mo/web/org_score.py
+
1
−
1
View file @
e9e8c153
...
...
@@ -297,7 +297,7 @@ def org_score_snapshots(ct_id: int):
break
if
found
and
set_final_form
.
submit_set_final
:
ctx
.
contest
.
scoretable_id
=
scoretable_id
mo
.
jobs
.
score
.
schedule_export_score_to_mo_web
(
scoretable
)
mo
.
jobs
.
score
.
schedule_export_score_to_mo_web
(
ctx
.
contest
,
scoretable
)
mo
.
util
.
log
(
type
=
db
.
LogType
.
contest
,
what
=
ctx
.
contest
.
contest_id
,
...
...
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