Skip to content

Commit

Permalink
correct AfterJobRuns doc (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRoesler committed Feb 2, 2024
1 parent b1ffc66 commit 0d01bb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions job.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ func WithTags(tags ...string) JobOption {
// listeners that can be used to listen for job events.
type EventListener func(*internalJob) error

// AfterJobRuns is used to listen for when a job has run regardless
// of any returned error value, and run the provided function.
// AfterJobRuns is used to listen for when a job has run
// without an error, and then run the provided function.
func AfterJobRuns(eventListenerFunc func(jobID uuid.UUID, jobName string)) EventListener {
return func(j *internalJob) error {
if eventListenerFunc == nil {
Expand Down

0 comments on commit 0d01bb4

Please sign in to comment.