Reorganized directories and packages.

This commit is contained in:
mikestefanello 2022-11-02 19:23:26 -04:00
parent 965fb540c7
commit dceb232cb2
61 changed files with 83 additions and 83 deletions

22
pkg/tasks/example.go Normal file
View file

@ -0,0 +1,22 @@
package tasks
import (
"context"
"log"
"github.com/hibiken/asynq"
)
// TypeExample is the type for the example task.
// This is what is passed in to TaskClient.New() when creating a new task
const TypeExample = "example_task"
// ExampleProcessor processes example tasks
type ExampleProcessor struct {
}
// ProcessTask handles the processing of the task
func (p *ExampleProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error {
log.Printf("executing task: %s", t.Type())
return nil
}