mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-21 16:14:04 +09:00
chore: move job emitter to service
This commit is contained in:
15
services/bots/bots.go
Normal file
15
services/bots/bots.go
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package bots
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/queue"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
jobEmitterQueue = queue.CreateUniqueQueue("bots_ready_job", jobEmitterQueueHandle, new(jobUpdate))
|
||||
go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
|
||||
}
|
Reference in New Issue
Block a user