Sha256: 86db0e6fed1671e0bdaca479e74d1143002400274213b3f9ec2c1385a20eab0b

Contents?: true

Size: 979 Bytes

Versions: 13

Compression:

Stored size: 979 Bytes

Contents

When /^I run the delayed jobs$/ do
  unless @resque_worker
    @resque_worker = Resque::Worker.new("ts_delta")
    @resque_worker.register_worker
  end
  while job = @resque_worker.reserve
    @resque_worker.perform(job)
  end
end

When /^I run one delayed job$/ do
  unless @resque_worker
    @resque_worker = Resque::Worker.new("ts_delta")
    @resque_worker.register_worker
  end
  job = @resque_worker.reserve
  @resque_worker.perform(job)
end

When /^I cancel the jobs$/ do
  ThinkingSphinx::Deltas::ResqueDelta.cancel_thinking_sphinx_jobs
end

When /^I change the name of delayed beta (\w+) to (\w+)$/ do |current, replacement|
  DelayedBeta.find_by_name(current).update_attributes(:name => replacement)
end

Then /^there should be no more DeltaJobs on the Resque queue$/ do
  job_classes = Resque.redis.lrange("queue:ts_delta", 0, -1).collect do |j|
    Resque.decode(j)["class"]
  end
  job_classes.should_not include("ThinkingSphinx::Deltas::ResqueDelta::DeltaJob")
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ts-resque-delta-1.1.5 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-1.1.4 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-1.1.3 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-1.1.2 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-1.1.1 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-1.1.0 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-1.0.0 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-0.0.6 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-0.0.5 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-0.0.4 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-0.0.3 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-0.0.2 features/step_definitions/resque_delta_steps.rb
ts-resque-delta-0.0.1 features/step_definitions/resque_delta_steps.rb