Skip to content

Commit 2533c9d

Browse files
committed
some improvements
1 parent 5ff2a6e commit 2533c9d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

services/pull/check.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,12 @@ func CheckPRsForBaseBranch(ctx context.Context, baseRepo *repo_model.Repository,
398398
// Init runs the task queue to test all the checking status pull requests
399399
func Init() error {
400400
prPatchCheckerQueue = queue.CreateUniqueQueue(graceful.GetManager().ShutdownContext(), "pr_patch_checker", handler)
401-
402401
if prPatchCheckerQueue == nil {
403402
return fmt.Errorf("unable to create pr_patch_checker queue")
404403
}
405404

405+
notify_service.RegisterNotifier(newNotifier())
406+
406407
go graceful.GetManager().RunWithCancel(prPatchCheckerQueue)
407408
go graceful.GetManager().RunWithShutdownContext(InitializePullRequests)
408409
return nil

services/pull/notify.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ type pullNotifier struct {
1818

1919
var _ notify_service.Notifier = &pullNotifier{}
2020

21-
// NewNotifier create a new indexerNotifier notifier
22-
func NewNotifier() notify_service.Notifier {
21+
// newNotifier create a new indexerNotifier notifier
22+
func newNotifier() notify_service.Notifier {
2323
return &pullNotifier{}
2424
}
2525

0 commit comments

Comments
 (0)