Skip to content

Commit

Permalink
examples: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
acaloiaro committed Sep 24, 2023
1 parent c113929 commit 11127ae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/add_job_with_custom_concurrency/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func main() {
log.Println("error listening to queue", err)
}

// enqueue a job
_, err = nq.Enqueue(ctx, &jobs.Job{
Queue: queue,
Payload: map[string]interface{}{
Expand Down
3 changes: 0 additions & 3 deletions examples/add_postgres_job/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"log"
"time"

"github.com/acaloiaro/neoq"
"github.com/acaloiaro/neoq/backends/postgres"
Expand All @@ -26,7 +25,6 @@ func main() {

h := handler.New(queue, func(ctx context.Context) (err error) {
var j *jobs.Job
time.Sleep(1 * time.Second)
j, err = jobs.FromContext(ctx)
log.Println("got job id:", j.ID, "messsage:", j.Payload["message"])
done <- true
Expand All @@ -38,7 +36,6 @@ func main() {
log.Println("error listening to queue", err)
}

// Add a job that will execute 1 hour from now
jobID, err := nq.Enqueue(ctx, &jobs.Job{
Queue: queue,
Payload: map[string]interface{}{
Expand Down

0 comments on commit 11127ae

Please sign in to comment.