lib/right_chimp/queue/ChimpQueue.rb in right_chimp-2.1.25.2 vs lib/right_chimp/queue/ChimpQueue.rb in right_chimp-2.1.26
- old
+ new
@@ -49,9 +49,10 @@
# Push a task into the queue
#
def push(g, w)
raise "no group specified" unless g
create_group(g) if not ChimpQueue[g]
+
ChimpQueue[g].push(w) unless ChimpQueue[g].get_job(w.job_id)
end
def create_group(name, type = :parallel, concurrency = 1)
Log.debug "Creating new execution group #{name} type=#{type} concurrency=#{concurrency}"