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
3797fc36
Commit
3797fc36
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
run-jobs: (znovu)spuštění konkrétního jobu
parent
d868622d
Branches
Branches containing commit
No related tags found
1 merge request
!81
Generování protokolů a zpracování scanů
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/run-jobs
+14
-3
14 additions, 3 deletions
bin/run-jobs
with
14 additions
and
3 deletions
bin/run-jobs
+
14
−
3
View file @
3797fc36
#!/usr/bin/env python3
#!/usr/bin/env python3
import
mo.jobs
import
mo.jobs
import
mo.util
from
mo.util
import
die
,
init_standalone
import
argparse
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'
Spustí joby ve frontě
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Spustí joby ve frontě
'
)
parser
.
add_argument
(
'
-j
'
,
'
--job
'
,
type
=
int
,
metavar
=
'
ID
'
,
help
=
'
Spustí konkrétní job
'
)
parser
.
add_argument
(
'
-r
'
,
'
--retry
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
'
Znovu spustí dokončený job
'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
mo
.
util
.
init_standalone
()
init_standalone
()
if
args
.
job
is
None
:
if
args
.
retry
:
die
(
"
Přepínač --retry lze použít jen s --job
"
)
mo
.
jobs
.
process_jobs
()
mo
.
jobs
.
process_jobs
()
else
:
tj
=
mo
.
jobs
.
TheJob
(
args
.
job
)
if
not
tj
.
load
():
die
(
"
Tento job neexistuje
"
)
tj
.
run
(
retry
=
args
.
retry
)
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