Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ProfiT-HPC
aggregator
Commits
32b2f2a4
Commit
32b2f2a4
authored
Sep 18, 2019
by
Azat Khuziyakhmetov
Browse files
fixed bug with slurm time parsing
parent
1676fe87
Changes
1
Hide whitespace changes
Inline
Side-by-side
postexec/exportjobinfo.py
View file @
32b2f2a4
...
...
@@ -130,7 +130,7 @@ def slurm_time_to_sec(slurm_time):
# 1:days, 2:hours, 3:minutes, 4:seconds
m
=
re
.
search
(
"([0-9]{2})?-?([0-9]{2})?:?([0-9]{2}):([0-9]{2})"
,
slurm_time
)
"([0-9]{
1,
2})?-?([0-9]{2})?:?([0-9]{2}):([0-9]{2})"
,
slurm_time
)
if
m
.
group
(
4
)
is
None
or
m
.
group
(
3
)
is
None
:
raise
ValueError
(
"Couldn't parse time"
,
slurm_time
)
...
...
@@ -319,7 +319,7 @@ def export_job_info(job_id):
fdata
=
format_influx_db_out
(
job_id
,
job_info
,
alloc_info
)
payload
=
{
'db'
:
confdb
.
IDB
[
"database"
],
'precision'
:
's'
}
print
(
fdata
)
write_url
=
"{:s}/write"
.
format
(
confdb
.
IDB
[
"api_url"
])
r
=
requests
.
post
(
write_url
,
auth
=
HTTPBasicAuth
(
confdb
.
IDB
[
"username"
],
confdb
.
IDB
[
"password"
]),
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment