Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
gridtk
Commits
5b8b8c2d
Commit
5b8b8c2d
authored
Feb 06, 2015
by
Manuel Günther
Browse files
Now, also except 'submitted' status when re-submitting locally.
parent
dc2ed0d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
gridtk/local.py
View file @
5b8b8c2d
...
...
@@ -72,13 +72,16 @@ class JobManagerLocal(JobManager):
jobs
[
0
].
set_command_line
(
new_command
)
else
:
logger
.
warn
(
"Ignoring new command since no single job id was specified"
)
accepted_old_status
=
(
'success'
,
'failure'
)
if
also_success
else
(
'failure'
,)
accepted_old_status
=
(
'submitted'
,
'success'
,
'failure'
)
if
also_success
else
(
'submitted'
,
'failure'
,)
for
job
in
jobs
:
# check if this job needs re-submission
if
running_jobs
or
job
.
status
in
accepted_old_status
:
# re-submit job to the grid
logger
.
info
(
"Re-submitted job '%s' to the database"
%
job
)
job
.
submit
(
'local'
)
if
job
.
queue_name
!=
'local'
and
job
.
status
==
'executing'
:
logger
.
error
(
"Cannot re-submit job '%s' locally since it is still running in the grid. Use 'jman stop' to stop it
\'
s execution!"
)
else
:
# re-submit job to the grid
logger
.
info
(
"Re-submitted job '%s' to the database"
%
job
)
job
.
submit
(
'local'
)
self
.
session
.
commit
()
self
.
unlock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment