diff --git a/examples/add_job_with_custom_concurrency/main.go b/examples/add_job_with_custom_concurrency/main.go index 05c8dc6..dd03aed 100644 --- a/examples/add_job_with_custom_concurrency/main.go +++ b/examples/add_job_with_custom_concurrency/main.go @@ -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{}{ diff --git a/examples/add_postgres_job/main.go b/examples/add_postgres_job/main.go index cd2810b..b99fdd1 100644 --- a/examples/add_postgres_job/main.go +++ b/examples/add_postgres_job/main.go @@ -3,7 +3,6 @@ package main import ( "context" "log" - "time" "github.com/acaloiaro/neoq" "github.com/acaloiaro/neoq/backends/postgres" @@ -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 @@ -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{}{