aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/archiver/archiver.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/archiver/archiver.go')
-rw-r--r--services/repository/archiver/archiver.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/services/repository/archiver/archiver.go b/services/repository/archiver/archiver.go
index 1c514a4112..2e3defee8d 100644
--- a/services/repository/archiver/archiver.go
+++ b/services/repository/archiver/archiver.go
@@ -297,7 +297,7 @@ func ArchiveRepository(request *ArchiveRequest) (*repo_model.RepoArchiver, error
var archiverQueue *queue.WorkerPoolQueue[*ArchiveRequest]
-// Init initlize archive
+// Init initializes archiver
func Init() error {
handler := func(items ...*ArchiveRequest) []*ArchiveRequest {
for _, archiveReq := range items {
@@ -309,12 +309,11 @@ func Init() error {
return nil
}
- archiverQueue = queue.CreateUniqueQueue("repo-archive", handler)
+ archiverQueue = queue.CreateUniqueQueue(graceful.GetManager().ShutdownContext(), "repo-archive", handler)
if archiverQueue == nil {
- return errors.New("unable to create codes indexer queue")
+ return errors.New("unable to create repo-archive queue")
}
-
- go graceful.GetManager().RunWithShutdownFns(archiverQueue.Run)
+ go graceful.GetManager().RunWithCancel(archiverQueue)
return nil
}