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
04fac40f
Commit
04fac40f
authored
3 years ago
by
Cyril Danilevski
Browse files
Options
Downloads
Patches
Plain Diff
Update MyMDC with calibration begin and end times
parent
cdca2f98
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!560
[webservice] Update MyMDC with begin and end times
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webservice/webservice.py
+10
-1
10 additions, 1 deletion
webservice/webservice.py
with
10 additions
and
1 deletion
webservice/webservice.py
+
10
−
1
View file @
04fac40f
...
...
@@ -15,7 +15,7 @@ import sys
import
time
import
urllib.parse
from
asyncio
import
get_event_loop
,
shield
from
datetime
import
datetime
from
datetime
import
datetime
,
timezone
from
pathlib
import
Path
from
subprocess
import
PIPE
,
run
from
threading
import
Thread
...
...
@@ -427,6 +427,10 @@ def update_job_db(config):
except
KafkaError
:
logging
.
warning
(
"
Error sending Kafka notification
"
,
exc_info
=
True
)
mdc
.
update_run_api
(
rid
,
# The result from MyMDC does not matter here.
{
'
cal_last_end_at
'
:
datetime
.
now
(
tz
=
timezone
.
utc
).
isoformat
()}
)
msg
=
"
\n
"
.
join
(
statii
)
msg_debug
=
f
"
Update MDC
{
rid
}
,
{
msg
}
"
logging
.
debug
(
msg_debug
.
replace
(
'
\n
'
,
'
,
'
))
...
...
@@ -928,6 +932,11 @@ class ActionsServer:
request_time
,
)
await
update_mdc_status
(
self
.
mdc
,
'
correct
'
,
rid
,
ret
)
loop
=
get_event_loop
()
await
loop
.
run_in_executor
(
None
,
self
.
mdc
.
update_run_api
,
rid
,
{
'
cal_last_begin_at
'
:
datetime
.
now
(
tz
=
timezone
.
utc
).
isoformat
()}
)
# END of part to run after sending reply
asyncio
.
ensure_future
(
_continue
())
...
...
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