mirror of
https://github.com/go-gitea/gitea
synced 2025-02-04 14:04:28 +00:00
some improvements
This commit is contained in:
parent
1edf4f1eb1
commit
2e2c4f98f3
@ -404,11 +404,12 @@ func CheckPRsForBaseBranch(ctx context.Context, baseRepo *repo_model.Repository,
|
||||
// Init runs the task queue to test all the checking status pull requests
|
||||
func Init() error {
|
||||
prPatchCheckerQueue = queue.CreateUniqueQueue(graceful.GetManager().ShutdownContext(), "pr_patch_checker", handler)
|
||||
|
||||
if prPatchCheckerQueue == nil {
|
||||
return fmt.Errorf("unable to create pr_patch_checker queue")
|
||||
}
|
||||
|
||||
notify_service.RegisterNotifier(newNotifier())
|
||||
|
||||
go graceful.GetManager().RunWithCancel(prPatchCheckerQueue)
|
||||
go graceful.GetManager().RunWithShutdownContext(InitializePullRequests)
|
||||
return nil
|
||||
|
@ -18,8 +18,8 @@ type pullNotifier struct {
|
||||
|
||||
var _ notify_service.Notifier = &pullNotifier{}
|
||||
|
||||
// NewNotifier create a new indexerNotifier notifier
|
||||
func NewNotifier() notify_service.Notifier {
|
||||
// newNotifier create a new indexerNotifier notifier
|
||||
func newNotifier() notify_service.Notifier {
|
||||
return &pullNotifier{}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user