Class: Conflow::Redis::CompleteJobScript Private

Inherits:
Script
  • Object
show all
Defined in:
lib/conflow/redis/complete_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

API:

  • private

Class Method Summary collapse

Methods inherited from Script

inherited

Class Method Details

.call(flow, job) ⇒ 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)

Parameters:

  • Flow to which job belongs to

  • Job to be marked as completed

API:

  • private



30
31
32
# File 'lib/conflow/redis/complete_job_script.rb', line 30

def call(flow, job)
  super([flow.indegree.key, flow.queued_jobs.key, job.key], [job.id])
end