X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/17f4a03d71d8d6130f796d61fa49b8480bf555b6..cd0e7f06116925d66cc370a03cef1b8c19d0002d:/services/crunch-dispatch-slurm/squeue.go diff --git a/services/crunch-dispatch-slurm/squeue.go b/services/crunch-dispatch-slurm/squeue.go index 85fadbdd99..d22e02597b 100644 --- a/services/crunch-dispatch-slurm/squeue.go +++ b/services/crunch-dispatch-slurm/squeue.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main import ( @@ -96,6 +100,7 @@ func (sqc *SqueueChecker) start() { // All waits for the next squeue invocation, and returns all job // names reported by squeue. func (sqc *SqueueChecker) All() []string { + sqc.startOnce.Do(sqc.start) sqc.L.Lock() defer sqc.L.Unlock() sqc.Wait()