From 6e1fcc64e8b6a5b4ae0025ac71f25a3e7b67a79b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 14 Apr 2024 04:00:20 -0400 Subject: [PATCH] feat: add WithId --- job.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/job.go b/job.go index 5b0302c4..324ec0b1 100644 --- a/job.go +++ b/job.go @@ -610,6 +610,16 @@ func WithTags(tags ...string) JobOption { } } +// WithIdentifier sets the identifier for the job. The identifier +// is used to uniquely identify the job and is used for logging +// and metrics. +func WithIdentifier(id uuid.UUID) JobOption { + return func(j *internalJob) error { + j.id = id + return nil + } +} + // ----------------------------------------------- // ----------------------------------------------- // ------------- Job Event Listeners -------------