Class: Conflow::Redis::QueueJobsScript

Inherits:
Script
  • Object
show all
Defined in:
lib/conflow/redis/queue_jobs_script.rb

Overview

Removes jobs from indegree set, adds them to queued list, and returns IDs of queued jobs.

Class Method Summary collapse

Methods inherited from Script

inherited

Class Method Details

.call(flow) ⇒ Object

Call the script. Script removes jobs which have score 0 in Flow’s indegree set and moves them to queued_jobs list.

Parameters:

  • flow (Conflow::Flow)

    Flow from which jobs should be enqueued



25
26
27
# File 'lib/conflow/redis/queue_jobs_script.rb', line 25

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