Skip to content

Commit

Permalink
more missing pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmcatee committed Oct 3, 2019
1 parent 4d71ef5 commit 28d34b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 2 additions & 6 deletions common/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,7 @@ func (q *Queue) keeper() {
}
} else {
// Job has been started so mark the hardware as in use and assign the resource ID
if retJob.Status == STATUS_RUNNING {
q.pool[resKey].Hardware[hardwareKey] = false
}
q.pool[resKey].Hardware[hardwareKey] = false

log.WithFields(log.Fields{
"uuid": retJob.UUID,
Expand Down Expand Up @@ -1096,9 +1094,7 @@ func (q *Queue) keeper() {
}
} else {
// Job has been started so mark the hardware as in use
if retJob.Status == STATUS_RUNNING {
q.pool[resKey].Hardware[hardwareKey] = false
}
q.pool[resKey].Hardware[hardwareKey] = false

log.WithFields(log.Fields{
"uuid": retJob.UUID,
Expand Down
2 changes: 2 additions & 0 deletions common/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ func (q *Queue) TaskDone(rpc common.RPCCall, j *common.Job) error {

common.CopyJob(q.stack[rpc.Job.UUID].Status(), j)

q.stack[rpc.Job.UUID].Done()

// Delete the specific job
delete(q.stack, rpc.Job.UUID)

Expand Down

0 comments on commit 28d34b3

Please sign in to comment.