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
fa9d755b
Commit
fa9d755b
authored
2 years ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Use module specific logger in more places
parent
8ca53b93
No related branches found
No related tags found
1 merge request
!668
[Webservice] Monitor Slurm jobs in separate process
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webservice/job_monitor.py
+3
-3
3 additions, 3 deletions
webservice/job_monitor.py
with
3 additions
and
3 deletions
webservice/job_monitor.py
+
3
−
3
View file @
fa9d755b
...
...
@@ -38,7 +38,7 @@ def init_kafka_producer(config):
max_block_ms
=
2000
,
# Don't get stuck trying to send Kafka messages
)
except
KafkaError
:
log
ging
.
warning
(
"
Problem initialising Kafka producer;
"
log
.
warning
(
"
Problem initialising Kafka producer;
"
"
Kafka notifications will not be sent.
"
,
exc_info
=
True
)
return
NoOpProducer
()
...
...
@@ -79,7 +79,7 @@ def slurm_job_status(jobid):
if
res
.
returncode
==
0
:
rlines
=
res
.
stdout
.
decode
().
split
(
"
\n
"
)
log
ging
.
debug
(
"
Job {} state {}
"
.
format
(
jobid
,
rlines
[
2
].
split
()))
log
.
debug
(
"
Job {} state {}
"
.
format
(
jobid
,
rlines
[
2
].
split
()))
if
len
(
rlines
[
2
].
split
())
==
3
:
return
rlines
[
2
].
replace
(
"
+
"
,
""
).
split
()
return
"
NA
"
,
"
NA
"
,
"
NA
"
...
...
@@ -90,7 +90,7 @@ def update_job_db(config):
:param config: configuration parsed from webservice YAML
"""
log
.
info
(
"
Starting
config db handling
"
)
log
.
info
(
"
Starting
jobs monitor
"
)
conn
=
init_job_db
(
config
)
mdc
=
init_md_client
(
config
)
kafka_prod
=
init_kafka_producer
(
config
)
...
...
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