Commit e6595bdb authored by charlie-ablett's avatar charlie-ablett
Browse files

add Rik's step gem to StepGemfile

parent 5cb86361
......@@ -27,6 +27,12 @@ GIT
specs:
inkstep_coko_demo_steps (1.0.2)
GIT
remote: https://gitlab.coko.foundation/blahah/inkstep_development
revision: 9085306782b62d2ab1b5e2ca61907998f923156f
specs:
inkstep_development (1.0.0)
GEM
remote: https://rubygems.org/
specs:
......@@ -346,6 +352,7 @@ DEPENDENCIES
ink_step!
inkstep_coko_conversion!
inkstep_coko_demo_steps!
inkstep_development!
jbuilder (~> 2.0)
jquery-rails
json_spec
......
......@@ -115,25 +115,25 @@ class Recipe < ApplicationRecord
end
def execute_recipe_in_progress?
Sidekiq::Workers.new.each do |process_id, thread_id, work|
return true if work['payload']['args'].include?(self.id)
# process_id is a unique identifier per Sidekiq process
# thread_id is a unique identifier per thread
# work is a Hash which looks like:
# { 'queue' => name, 'run_at' => timestamp, 'payload' => msg }
# run_at is an epoch Integer.
# payload is a Hash which looks like:
# { 'retry' => true,
# 'queue' => 'default',
# 'class' => 'Redacted',
# 'args' => [1, 2, 'foo'],
# 'jid' => '80b1e7e46381a20c0c567285',
# 'enqueued_at' => 1427811033.2067106 }
end
Sidekiq::Queue.new.each do |job|
return true if job.args.include?(self.id)
end
# Sidekiq::Workers.new.each do |process_id, thread_id, work|
# return true if work['payload']['args'].include?(self.id)
# # process_id is a unique identifier per Sidekiq process
# # thread_id is a unique identifier per thread
# # work is a Hash which looks like:
# # { 'queue' => name, 'run_at' => timestamp, 'payload' => msg }
# # run_at is an epoch Integer.
# # payload is a Hash which looks like:
# # { 'retry' => true,
# # 'queue' => 'default',
# # 'class' => 'Redacted',
# # 'args' => [1, 2, 'foo'],
# # 'jid' => '80b1e7e46381a20c0c567285',
# # 'enqueued_at' => 1427811033.2067106 }
# end
#
# Sidekiq::Queue.new.each do |job|
# return true if job.args.include?(self.id)
# end
false
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment