Merge pull request #16 from damonlau27/master

prefer remote worker
This commit is contained in:
Łukasz Magiera 2020-04-22 10:51:39 +02:00 committed by GitHub
commit 6a3320b113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,8 @@ func (m *Manager) maybeSchedRequest(req *workerRequest) (*workerResponse, error)
tried := 0
for _, id := range req.accept {
for i := len(req.accept) - 1; i >= 0; i-- {
id := req.accept[i]
w, ok := m.workers[id]
if !ok {
log.Warnf("requested worker %d is not in scheduler", id)