Class: Tasker::HashIdentityStrategy
- Inherits:
-
IdentityStrategy
- Object
- IdentityStrategy
- Tasker::HashIdentityStrategy
- Defined in:
- lib/tasker/identity_strategy.rb
Overview
Strategy that uses SHA256 hash of task identity options
This strategy is useful when you want identical tasks (with the same options/parameters) to have the same identity hash.
Instance Method Summary collapse
-
#generate_identity_hash(_task, task_options) ⇒ String
Generate a deterministic identity hash based on task options.
Instance Method Details
#generate_identity_hash(_task, task_options) ⇒ String
Generate a deterministic identity hash based on task options
34 35 36 |
# File 'lib/tasker/identity_strategy.rb', line 34 def generate_identity_hash(_task, ) Digest::SHA256.hexdigest(.to_json) end |