Added asynq and a task client to the container to faciliate task queues.
This commit is contained in:
parent
a82ed9c6d0
commit
c43f62a570
12 changed files with 392 additions and 34 deletions
7
main.go
7
main.go
|
|
@ -51,6 +51,13 @@ func main() {
|
|||
}
|
||||
}()
|
||||
|
||||
// Start the scheduler service to queue periodic tasks
|
||||
go func() {
|
||||
if err := c.Tasks.StartScheduler(); err != nil {
|
||||
c.Web.Logger.Fatalf("scheduler shutdown: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Wait for interrupt signal to gracefully shutdown the server with a timeout of 10 seconds.
|
||||
quit := make(chan os.Signal, 1)
|
||||
signal.Notify(quit, os.Interrupt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue