projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20259: Add documentation for banner and tooltip features
[arvados.git]
/
services
/
crunch-dispatch-slurm
/
squeue.go
diff --git
a/services/crunch-dispatch-slurm/squeue.go
b/services/crunch-dispatch-slurm/squeue.go
index 5aee7e087b2658945b2eebe1f2f309d67c351d16..d4e41ed1fb2c5dd4f114dfa7d5493dcd79b28015 100644
(file)
--- a/
services/crunch-dispatch-slurm/squeue.go
+++ b/
services/crunch-dispatch-slurm/squeue.go
@@
-2,7
+2,7
@@
//
// SPDX-License-Identifier: AGPL-3.0
//
// SPDX-License-Identifier: AGPL-3.0
-package
main
+package
dispatchslurm
import (
"bytes"
import (
"bytes"
@@
-23,8
+23,8
@@
type slurmJob struct {
hitNiceLimit bool
}
hitNiceLimit bool
}
-// Squeue
implements asynchronous polling monitor of the SLURM queue using th
e
-// command 'squeue'.
+// Squeue
Checker implements asynchronous polling monitor of the SLURM queu
e
+//
using the
command 'squeue'.
type SqueueChecker struct {
Logger logger
Period time.Duration
type SqueueChecker struct {
Logger logger
Period time.Duration
@@
-102,13
+102,12
@@
func (sqc *SqueueChecker) reniceAll() {
sort.Slice(jobs, func(i, j int) bool {
if jobs[i].wantPriority != jobs[j].wantPriority {
return jobs[i].wantPriority > jobs[j].wantPriority
sort.Slice(jobs, func(i, j int) bool {
if jobs[i].wantPriority != jobs[j].wantPriority {
return jobs[i].wantPriority > jobs[j].wantPriority
- } else {
- // break ties with container uuid --
- // otherwise, the ordering would change from
- // one interval to the next, and we'd do many
- // pointless slurm queue rearrangements.
- return jobs[i].uuid > jobs[j].uuid
}
}
+ // break ties with container uuid --
+ // otherwise, the ordering would change from
+ // one interval to the next, and we'd do many
+ // pointless slurm queue rearrangements.
+ return jobs[i].uuid > jobs[j].uuid
})
renice := wantNice(jobs, sqc.PrioritySpread)
for i, job := range jobs {
})
renice := wantNice(jobs, sqc.PrioritySpread)
for i, job := range jobs {