diff options
Diffstat (limited to 'modules/mirror/mirror.go')
-rw-r--r-- | modules/mirror/mirror.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/mirror/mirror.go b/modules/mirror/mirror.go index 73e591adba..0d9a624730 100644 --- a/modules/mirror/mirror.go +++ b/modules/mirror/mirror.go @@ -33,9 +33,11 @@ func StartSyncMirrors(queueHandle func(data ...*SyncRequest) []*SyncRequest) { if !setting.Mirror.Enabled { return } - mirrorQueue = queue.CreateUniqueQueue("mirror", queueHandle) - - go graceful.GetManager().RunWithShutdownFns(mirrorQueue.Run) + mirrorQueue = queue.CreateUniqueQueue(graceful.GetManager().ShutdownContext(), "mirror", queueHandle) + if mirrorQueue == nil { + log.Fatal("Unable to create mirror queue") + } + go graceful.GetManager().RunWithCancel(mirrorQueue) } // AddPullMirrorToQueue adds repoID to mirror queue |