Class: Tasker::IdentityStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/tasker/identity_strategy.rb

Overview

Base identity strategy class that generates a GUID by default

Identity strategies are used to generate unique identifiers for tasks. This allows for customizing how task identity is determined and tracked.

Direct Known Subclasses

HashIdentityStrategy

Instance Method Summary collapse

Instance Method Details

#generate_identity_hash(_task, _task_options) ⇒ String

Generate a unique identity hash for a task

The default implementation generates a random UUID.



19
20
21
# File 'lib/tasker/identity_strategy.rb', line 19

def generate_identity_hash(_task, _task_options)
  SecureRandom.uuid
end