module Mosquito::UniqueJob

Defined in:

mosquito/unique_job.cr

Instance Method Summary

Instance Method Detail

def unique_duration : Time::Span #

Returns the uniqueness lock duration configured for this job class.


def uniqueness_key(job_run : Mosquito::JobRun) : String #

Builds the uniqueness key from the job name and the job_run's config.

When @@unique_key_fields is set, only those parameter names are included in the key. Otherwise all config entries are used.