mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-13 07:46:43 +00:00
update
This commit is contained in:
@@ -132,7 +132,7 @@ func (pool *ResourcePool) getNodePool(name string) int {
|
|||||||
/* save pool status periodically */
|
/* save pool status periodically */
|
||||||
func (pool *ResourcePool) saveStatusHistory() {
|
func (pool *ResourcePool) saveStatusHistory() {
|
||||||
/* waiting for data */
|
/* waiting for data */
|
||||||
time.Sleep(time.Second * 30)
|
//time.Sleep(time.Second * 30)
|
||||||
for {
|
for {
|
||||||
summary := PoolStatus{}
|
summary := PoolStatus{}
|
||||||
|
|
||||||
|
|||||||
@@ -353,7 +353,6 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task, nodes []Node
|
|||||||
|
|
||||||
for cur := start; ; {
|
for cur := start; ; {
|
||||||
if _, ok := locks[cur.ID]; !ok {
|
if _, ok := locks[cur.ID]; !ok {
|
||||||
log.Info("lock ", cur.ID)
|
|
||||||
cur.Lock.Lock()
|
cur.Lock.Lock()
|
||||||
locks[cur.ID] = &cur.Lock
|
locks[cur.ID] = &cur.Lock
|
||||||
}
|
}
|
||||||
@@ -403,7 +402,6 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task, nodes []Node
|
|||||||
allocationType = 2
|
allocationType = 2
|
||||||
for cur := start; ; {
|
for cur := start; ; {
|
||||||
if _, ok := locks[cur.ID]; !ok {
|
if _, ok := locks[cur.ID]; !ok {
|
||||||
log.Info("lock ", cur.ID)
|
|
||||||
cur.Lock.Lock()
|
cur.Lock.Lock()
|
||||||
locks[cur.ID] = &cur.Lock
|
locks[cur.ID] = &cur.Lock
|
||||||
}
|
}
|
||||||
@@ -445,7 +443,6 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task, nodes []Node
|
|||||||
allocationType = 3
|
allocationType = 3
|
||||||
for cur := start; ; {
|
for cur := start; ; {
|
||||||
if _, ok := locks[cur.ID]; !ok {
|
if _, ok := locks[cur.ID]; !ok {
|
||||||
log.Info("lock ", cur.ID)
|
|
||||||
cur.Lock.Lock()
|
cur.Lock.Lock()
|
||||||
locks[cur.ID] = &cur.Lock
|
locks[cur.ID] = &cur.Lock
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user