Added optional delay to tasks. Pool buffers when encoding.

This commit is contained in:
mikestefanello 2024-06-20 22:11:53 -04:00
parent 912ae2ca6b
commit b68f9bdf3c
8 changed files with 96 additions and 131 deletions

View file

@ -72,10 +72,11 @@ func (h *Contact) Submit(ctx echo.Context) error {
return err
}
// TODO create a new page for this
err = h.tasks.New(tasks.ExampleTask{
Message: input.Message,
}).
Wait(30 * time.Second).
Wait(10 * time.Second).
Save()
if err != nil {
return err