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
ff615817
Commit
ff615817
authored
15 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
correction to priority reset for monthly, quarterly and yearly logic
(was using day of month=0 instead of 1)
parent
9520a304
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/priority/multifactor/priority_multifactor.c
+3
-8
3 additions, 8 deletions
src/plugins/priority/multifactor/priority_multifactor.c
with
3 additions
and
8 deletions
src/plugins/priority/multifactor/priority_multifactor.c
+
3
−
8
View file @
ff615817
...
...
@@ -551,7 +551,7 @@ static time_t _next_reset(uint16_t reset_period, time_t last_reset)
tmp_time
+=
SECS_PER_WEEK
;
return
tmp_time
;
case
PRIORITY_RESET_MONTHLY
:
last_tm
.
tm_mday
=
0
;
last_tm
.
tm_mday
=
1
;
if
(
last_tm
.
tm_mon
<
11
)
last_tm
.
tm_mon
++
;
else
{
...
...
@@ -560,7 +560,7 @@ static time_t _next_reset(uint16_t reset_period, time_t last_reset)
}
break
;
case
PRIORITY_RESET_QUARTERLY
:
last_tm
.
tm_mday
=
0
;
last_tm
.
tm_mday
=
1
;
if
(
last_tm
.
tm_mon
<
3
)
last_tm
.
tm_mon
=
3
;
else
if
(
last_tm
.
tm_mon
<
6
)
...
...
@@ -573,7 +573,7 @@ static time_t _next_reset(uint16_t reset_period, time_t last_reset)
}
break
;
case
PRIORITY_RESET_YEARLY
:
last_tm
.
tm_mday
=
0
;
last_tm
.
tm_mday
=
1
;
last_tm
.
tm_mon
=
0
;
last_tm
.
tm_year
++
;
break
;
...
...
@@ -649,7 +649,6 @@ static void *_decay_thread(void *no_data)
* incorporate it into the decay loop.
*/
switch
(
reset_period
)
{
//char tmp_str[128];
case
PRIORITY_RESET_NONE
:
break
;
case
PRIORITY_RESET_NOW
:
/* do once */
...
...
@@ -665,16 +664,12 @@ static void *_decay_thread(void *no_data)
if
(
next_reset
==
0
)
{
next_reset
=
_next_reset
(
reset_period
,
last_reset
);
//slurm_make_time_str(&next_reset, tmp_str, 128);
//info("next_reset:%s", tmp_str);
}
if
(
now
>=
next_reset
)
{
_reset_usage
();
last_reset
=
next_reset
;
next_reset
=
_next_reset
(
reset_period
,
last_reset
);
//slurm_make_time_str(&next_reset, tmp_str, 128);
//info("next_reset:%s", tmp_str);
}
}
...
...
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