chore(queue): support NSQ as backend. (#600)
This commit is contained in:
@@ -20,6 +20,16 @@ type Worker struct {
|
||||
queueNotification chan gorush.PushNotification
|
||||
}
|
||||
|
||||
// BeforeRun run script before start worker
|
||||
func (s *Worker) BeforeRun() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterRun run script after start worker
|
||||
func (s *Worker) AfterRun() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Run start the worker
|
||||
func (s *Worker) Run(_ chan struct{}) error {
|
||||
for notification := range s.queueNotification {
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/appleboy/gorush/gorush"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user