photoprism/internal/mutex/mutex.go
Michael Mayer 2a24bf293d Backend: Rename PrismWorker to MetaWorker
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-06-29 13:35:38 +02:00

18 lines
329 B
Go

package mutex
import (
"sync"
)
var (
Db = sync.Mutex{}
MainWorker = Busy{}
SyncWorker = Busy{}
ShareWorker = Busy{}
MetaWorker = Busy{}
)
// WorkersBusy returns true if any worker is busy.
func WorkersBusy() bool {
return MainWorker.Busy() || SyncWorker.Busy() || ShareWorker.Busy() || MetaWorker.Busy()
}