Skip to content

Commit

Permalink
unholy act revoked
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmcatee committed Sep 26, 2019
1 parent f3573e1 commit 869142d
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions common/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ func (q *Queue) keeper() {
}
} else {
// Job has been started so mark the hardware as in use and assign the resource ID
jobs[jobKey].ResAssigned = resKey
retJob.ResAssigned = resKey
q.pool[resKey].Hardware[hardwareKey] = false

log.WithFields(log.Fields{
Expand Down Expand Up @@ -1704,24 +1704,6 @@ func (q *Queue) RemoveResource(resUUID string) error {
// resCall attempts to make a RPC call, but checks for a nil client first
// This really feels like a work around for something broken elsewhere...
func (q *Queue) resCall(resID string, client *rpc.Client, serviceMethod string, args interface{}, reply interface{}) error {
// Check for nil client
if client == nil {
// Find our resource
managers := q.AllResourceManagers()
for i := range managers {
_, _, err := managers[i].GetResource(resID)
if err != nil {
continue
}

err = q.reconnectResourceNoLock(resID, managers[i].GetTLSCOnfig())
if err != nil {
return err
}
}

// Hopefully this detects and fixes the issue
}

return client.Call(serviceMethod, args, reply)
}

0 comments on commit 869142d

Please sign in to comment.