Skip to content
Permalink
Browse files

add queue:work, queue:listen

Signed-off-by: Toby Yan <me@tobyan.com>
  • Loading branch information...
toby1991 committed May 15, 2019
1 parent 04b3c4d commit 840cc5244a64f1d61d58da777fcbc7079611102c
Showing with 6 additions and 10 deletions.
  1. +4 −3 artisan.go
  2. +1 −1 go.mod
  3. +1 −6 main.go
@@ -6,16 +6,17 @@ import (

"github.com/urfave/cli"

"github.com/totoval/framework/cmd/commands/failed_queue"
"github.com/totoval/framework/cmd/commands/migration"
"github.com/totoval/framework/console"

"github.com/totoval/framework/cache"
"github.com/totoval/framework/cmd"
command_queue "github.com/totoval/framework/cmd/commands/queue"
"github.com/totoval/framework/cmd/commands/schedule"
"github.com/totoval/framework/database"
"github.com/totoval/framework/helpers/m"
"github.com/totoval/framework/queue"

app_schedule "totoval/app/console"

"totoval/app/console/commands"
@@ -39,9 +40,9 @@ func init() {
listeners.Initialize()

migration.Initialize()
failed_queue.Initialize()
schedule.Initialize()
command_queue.Initialize()
commands.Initialize()
schedule.Initialize()
}

func main() {
2 go.mod
@@ -9,7 +9,7 @@ require (
github.com/go-playground/universal-translator v0.16.0
github.com/golang/protobuf v1.3.1
github.com/jinzhu/gorm v1.9.2
github.com/totoval/framework v0.5.3
github.com/totoval/framework v0.5.4
github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43 // indirect
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
@@ -15,9 +15,7 @@ import (
"github.com/totoval/framework/helpers/m"
"github.com/totoval/framework/helpers/zone"
"github.com/totoval/framework/http/middleware"
"github.com/totoval/framework/hub"
"github.com/totoval/framework/queue"

"totoval/app/events"
"totoval/app/jobs"
"totoval/app/listeners"
@@ -77,10 +75,7 @@ func main() {
//err := job.Dispatch(j)
//fmt.Println(err)

//go job.Process("example-job")
//fmt.Println(queue.Retry(1))

go hub.On("add-user-affiliation")
//go hub.On("add-user-affiliation") // go run artisan.go queue:listen add-user-affiliation

if err := s.ListenAndServe(); err != nil {
panic(err)

0 comments on commit 840cc52

Please sign in to comment.
You can’t perform that action at this time.