Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
ec814981
Commit
ec814981
authored
14 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
slight tweak to working of email on job start/end
parent
570c7872
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/slurmctld/agent.c
+13
-9
13 additions, 9 deletions
src/slurmctld/agent.c
with
13 additions
and
9 deletions
src/slurmctld/agent.c
+
13
−
9
View file @
ec814981
...
@@ -1467,21 +1467,25 @@ static char *_mail_type_str(uint16_t mail_type)
...
@@ -1467,21 +1467,25 @@ static char *_mail_type_str(uint16_t mail_type)
static
void
_set_job_time
(
struct
job_record
*
job_ptr
,
uint16_t
mail_type
,
static
void
_set_job_time
(
struct
job_record
*
job_ptr
,
uint16_t
mail_type
,
char
*
buf
,
int
buf_len
)
char
*
buf
,
int
buf_len
)
{
{
time_t
delay
=
NO_VAL
;
time_t
interval
=
NO_VAL
;
buf
[
0
]
=
'\0'
;
if
((
mail_type
==
MAIL_JOB_BEGIN
)
&&
job_ptr
->
start_time
&&
if
((
mail_type
==
MAIL_JOB_BEGIN
)
&&
job_ptr
->
start_time
&&
job_ptr
->
details
&&
job_ptr
->
details
->
submit_time
)
{
job_ptr
->
details
&&
job_ptr
->
details
->
submit_time
)
{
delay
=
job_ptr
->
start_time
-
job_ptr
->
details
->
submit_time
;
interval
=
job_ptr
->
start_time
-
job_ptr
->
details
->
submit_time
;
snprintf
(
buf
,
buf_len
,
", Queued time "
);
secs2time_str
(
interval
,
buf
+
14
,
buf_len
-
14
);
}
}
if
(((
mail_type
==
MAIL_JOB_END
)
||
(
mail_type
==
MAIL_JOB_FAIL
))
&&
if
(((
mail_type
==
MAIL_JOB_END
)
||
(
mail_type
==
MAIL_JOB_FAIL
))
&&
job_ptr
->
start_time
&&
job_ptr
->
end_time
)
{
job_ptr
->
start_time
&&
job_ptr
->
end_time
)
{
delay
=
job_ptr
->
end_time
-
job_ptr
->
start_time
;
if
(
job_ptr
->
susp
end_time
)
{
}
interval
=
job_ptr
->
end_time
-
job_ptr
->
suspend_time
;
if
(
delay
!=
NO_VAL
)
{
interval
+=
job_ptr
->
pre_sus_time
;
snprintf
(
buf
,
buf_len
,
" After "
);
}
else
secs2time_str
(
delay
,
buf
+
7
,
buf_len
-
7
)
;
interval
=
job_ptr
->
end_time
-
job_ptr
->
start_time
;
}
else
if
(
buf_len
)
{
snprintf
(
buf
,
buf_len
,
", Run time "
);
buf
[
0
]
=
'\0'
;
secs2time_str
(
interval
,
buf
+
11
,
buf_len
-
11
)
;
}
}
}
}
...
...
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