Skip to content

v1.1.0

Choose a tag to compare

@pardnchiu pardnchiu released this 23 Dec 14:37
· 9 commits to master since this release

Features

  • Add Retry priority level (between High and Normal)
  • Add error retry mechanism with WithRetry() option
    // Enable retry with default max (3 times)
    q.Enqueue(ctx, "", action, queue.WithRetry(nil))
    
    // Enable retry with custom max
    maxRetry := 5
    q.Enqueue(ctx, "", action, queue.WithRetry(&maxRetry))
    
    // Updated callback (success only)
    q.Enqueue(ctx, "", action, queue.WithCallback(func(id string) {
      log.Printf("Task %s completed", id)
    }))