Initial rough draft switch to sqlite.
This commit is contained in:
parent
a70003d290
commit
ab55705b9f
15 changed files with 315 additions and 553 deletions
|
|
@ -1,22 +1,9 @@
|
|||
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
|
||||
type ExampleTask struct {
|
||||
Message string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue