Module: ChainedJob::Helpers
- Defined in:
- lib/chained_job/helpers.rb
Class Method Summary collapse
- .job_key(job_arguments_key) ⇒ Object
- .redis_key(job_key, tag) ⇒ Object
- .serialize(arguments) ⇒ Object
- .tag_list(prefix) ⇒ Object
Class Method Details
.job_key(job_arguments_key) ⇒ Object
7 8 9 |
# File 'lib/chained_job/helpers.rb', line 7 def job_key(job_arguments_key) "chained_job:#{job_arguments_key}" end |
.redis_key(job_key, tag) ⇒ Object
11 12 13 |
# File 'lib/chained_job/helpers.rb', line 11 def redis_key(job_key, tag) "#{job_key}:#{tag}" end |
.serialize(arguments) ⇒ Object
19 20 21 |
# File 'lib/chained_job/helpers.rb', line 19 def serialize(arguments) arguments.map { |argument| Marshal.dump(argument) } end |
.tag_list(prefix) ⇒ Object
15 16 17 |
# File 'lib/chained_job/helpers.rb', line 15 def tag_list(prefix) "#{prefix}:tags" end |