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
a12e8418
Commit
a12e8418
authored
4 years ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Log when jobs finish
parent
bfb936e7
No related branches found
No related tags found
1 merge request
!441
Refactor 'webservice' ZMQ server
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webservice/webservice.py
+7
-3
7 additions, 3 deletions
webservice/webservice.py
with
7 additions
and
3 deletions
webservice/webservice.py
+
7
−
3
View file @
a12e8418
...
@@ -377,6 +377,11 @@ async def update_job_db(config):
...
@@ -377,6 +377,11 @@ async def update_job_db(config):
flgs
,
statii
=
combined
[
rid
,
action
]
flgs
,
statii
=
combined
[
rid
,
action
]
# sort by least done status
# sort by least done status
flg
=
max
(
flgs
,
key
=
lambda
i
:
flg_order
[
i
])
flg
=
max
(
flgs
,
key
=
lambda
i
:
flg_order
[
i
])
if
flg
!=
'
R
'
:
logging
.
info
(
"
Jobs finished - action: %s, run id: %s, status: %s
"
,
action
,
rid
,
flg
,
)
msg
=
"
\n
"
.
join
(
statii
)
msg
=
"
\n
"
.
join
(
statii
)
msg_debug
=
f
"
Update MDC
{
rid
}
,
{
msg
}
"
msg_debug
=
f
"
Update MDC
{
rid
}
,
{
msg
}
"
logging
.
debug
(
msg_debug
.
replace
(
'
\n
'
,
'
,
'
))
logging
.
debug
(
msg_debug
.
replace
(
'
\n
'
,
'
,
'
))
...
@@ -392,9 +397,8 @@ async def update_job_db(config):
...
@@ -392,9 +397,8 @@ async def update_job_db(config):
logging
.
error
(
"
Failed to update MDC for action %s, rid %s
"
,
logging
.
error
(
"
Failed to update MDC for action %s, rid %s
"
,
action
,
rid
)
action
,
rid
)
logging
.
error
(
Errors
.
MDC_RESPONSE
.
format
(
response
))
logging
.
error
(
Errors
.
MDC_RESPONSE
.
format
(
response
))
except
Exception
as
e
:
except
Exception
:
e
=
str
(
e
)
logging
.
error
(
f
"
Failure to update job DB
"
,
exc_info
=
True
)
logging
.
error
(
f
"
Failure to update job DB:
{
e
}
"
)
await
asyncio
.
sleep
(
time_interval
)
await
asyncio
.
sleep
(
time_interval
)
...
...
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