mirror of
https://github.com/go-gitea/gitea
synced 2025-11-02 20:38:26 +00:00
chore: rename to Init
This commit is contained in:
@@ -11,11 +11,18 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/models/webhook"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/queue"
|
||||
|
||||
"github.com/nektos/act/pkg/model"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
jobEmitterQueue = queue.CreateUniqueQueue("bots_ready_job", jobEmitterQueueHandle, new(jobUpdate))
|
||||
go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
|
||||
}
|
||||
|
||||
func ListWorkflows(commit *git.Commit) (git.Entries, error) {
|
||||
tree, err := commit.SubTree(".gitea/workflows")
|
||||
if _, ok := err.(git.ErrNotExist); ok {
|
||||
|
||||
@@ -23,11 +23,6 @@ type jobUpdate struct {
|
||||
RunID int64
|
||||
}
|
||||
|
||||
func InitJobEmitter() {
|
||||
jobEmitterQueue = queue.CreateUniqueQueue("bots_ready_job", jobEmitterQueueHandle, new(jobUpdate))
|
||||
go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
|
||||
}
|
||||
|
||||
func EmitJobsIfReady(runID int64) error {
|
||||
err := jobEmitterQueue.Push(&jobUpdate{
|
||||
RunID: runID,
|
||||
|
||||
Reference in New Issue
Block a user