Commit e93056e9 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix typo on the build transition from pending state

parent 221b15bb
......@@ -295,16 +295,16 @@ module Ci
end
after_transition any => [:pending] do |build|
Ci::UpdateBuildQueueService.queue_push!(build)
Ci::UpdateBuildQueueService.new.queue_push!(build)
build.run_after_commit do
BuildQueueWorker.perform_async(id)
end
end
after transition pending: any do |build|
after_transition pending: any do |build|
# TODO ensure that there is no race condition here, add test for this
Ci::UpdateBuildQueueService.queue_pop!(build)
Ci::UpdateBuildQueueService.new.queue_pop!(build)
end
after_transition pending: :running do |build|
......
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