Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
87fa2921
Commit
87fa2921
authored
1 year ago
by
Thomas Kluyver
Committed by
Karim Ahmed
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix checking if jobs already running
parent
cb8c5d80
No related branches found
No related tags found
1 merge request
!836
[Webservice] Check for unfinished corrections before launching a new one
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webservice/webservice.py
+3
-3
3 additions, 3 deletions
webservice/webservice.py
with
3 additions
and
3 deletions
webservice/webservice.py
+
3
−
3
View file @
87fa2921
...
@@ -967,7 +967,7 @@ class ActionsServer:
...
@@ -967,7 +967,7 @@ class ActionsServer:
# A correction is already running for this run
# A correction is already running for this run
msg
=
Success
.
ALREADY_REQUESTED
.
format
(
proposal
,
runnr
)
msg
=
Success
.
ALREADY_REQUESTED
.
format
(
proposal
,
runnr
)
logging
.
debug
(
msg
)
logging
.
debug
(
msg
)
return
msg
return
msg
.
encode
()
with
time_db_transaction
(
self
.
job_db
,
'
Insert request
'
):
with
time_db_transaction
(
self
.
job_db
,
'
Insert request
'
):
cur
=
self
.
job_db
.
execute
(
# 2
cur
=
self
.
job_db
.
execute
(
# 2
...
@@ -1093,7 +1093,7 @@ class ActionsServer:
...
@@ -1093,7 +1093,7 @@ class ActionsServer:
# A correction is already running for this run
# A correction is already running for this run
msg
=
Success
.
ALREADY_REQUESTED
.
format
(
proposal
,
runnr
)
msg
=
Success
.
ALREADY_REQUESTED
.
format
(
proposal
,
runnr
)
logging
.
debug
(
msg
)
logging
.
debug
(
msg
)
return
msg
return
msg
.
encode
()
with
time_db_transaction
(
self
.
job_db
,
'
Insert request
'
):
with
time_db_transaction
(
self
.
job_db
,
'
Insert request
'
):
cur
=
self
.
job_db
.
execute
(
cur
=
self
.
job_db
.
execute
(
...
@@ -1388,7 +1388,7 @@ class ActionsServer:
...
@@ -1388,7 +1388,7 @@ class ActionsServer:
"
INNER JOIN requests USING (req_id)
"
"
INNER JOIN requests USING (req_id)
"
"
WHERE proposal = ? AND run = ? AND action =
'
CORRECT
'
"
"
WHERE proposal = ? AND run = ? AND action =
'
CORRECT
'
"
"
AND slurm_jobs.finished = 0
"
,
(
proposal
,
runnr
)
"
AND slurm_jobs.finished = 0
"
,
(
proposal
,
runnr
)
)
)
.
fetchone
()
return
row
is
not
None
return
row
is
not
None
@staticmethod
@staticmethod
...
...
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