Class: Conflow::Redis::AddJobScript Private
- Defined in:
- lib/conflow/redis/add_job_script.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Adds new job to flow
Class Method Summary collapse
-
.call(flow, job, after: []) ⇒ Object
private
Call the script.
Methods inherited from Script
Class Method Details
.call(flow, job, after: []) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Call the script. Script changes Flow#indegree of all of its successors by -1 (freeing them to be queued if it reaches 0) and sets Job#status to 1 (finished)
31 32 33 |
# File 'lib/conflow/redis/add_job_script.rb', line 31 def call(flow, job, after: []) super([flow.job_ids.key, flow.indegree.key, *after.map(&:key)], [job.id]) end |