Provide typed tasks.
This commit is contained in:
parent
3f46617f80
commit
d0539687bb
7 changed files with 133 additions and 104 deletions
|
|
@ -72,10 +72,9 @@ func (h *Contact) Submit(ctx echo.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = h.tasks.New(tasks.TypeExample).
|
||||
Payload(tasks.ExampleTask{
|
||||
Message: input.Message,
|
||||
}).
|
||||
err = h.tasks.New(tasks.ExampleTask{
|
||||
Message: input.Message,
|
||||
}).
|
||||
Wait(30 * time.Second).
|
||||
Save()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue