Added asynq and a task client to the container to faciliate task queues.

This commit is contained in:
mikestefanello 2022-02-02 21:24:52 -05:00
parent a82ed9c6d0
commit c43f62a570
12 changed files with 392 additions and 34 deletions

View file

@ -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)