Class: Kaal::IdempotencyKeyGenerator
- Inherits:
-
Object
- Object
- Kaal::IdempotencyKeyGenerator
- Defined in:
- lib/kaal/idempotency_key_generator.rb
Overview
Utility class for generating idempotency keys.
Centralizes the key format to prevent drift between public API and internal coordinator. Format: namespace-cron_key-fire_time_unix
Class Method Summary collapse
-
.call(cron_key, fire_time, configuration:) ⇒ String
Generate an idempotency key for a cron job.
Class Method Details
.call(cron_key, fire_time, configuration:) ⇒ String
Generate an idempotency key for a cron job.
26 27 28 29 |
# File 'lib/kaal/idempotency_key_generator.rb', line 26 def self.call(cron_key, fire_time, configuration:) namespace = configuration.namespace || 'kaal' "#{namespace}-#{cron_key}-#{fire_time.to_i}" end |