summaryrefslogtreecommitdiff
path: root/app/workers/ci
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-09-18 15:36:03 +0900
committerAlessio Caiazza <acaiazza@gitlab.com>2018-10-02 17:02:11 +0200
commite265fc3e28dbfe53d96646588a1587d5626e92de (patch)
tree49e65514b98037ad831c03ba81920d6840261553 /app/workers/ci
parenta5d296e9be7cc48ddc75d04b117ae62bae7c9f5b (diff)
downloadgitlab-ce-e265fc3e28dbfe53d96646588a1587d5626e92de.tar.gz
Rename delayed to scheduled
Diffstat (limited to 'app/workers/ci')
-rw-r--r--app/workers/ci/build_schedule_worker.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/workers/ci/build_schedule_worker.rb b/app/workers/ci/build_schedule_worker.rb
index 448fb5bf41e..9f81aa3c71e 100644
--- a/app/workers/ci/build_schedule_worker.rb
+++ b/app/workers/ci/build_schedule_worker.rb
@@ -9,7 +9,11 @@ module Ci
::Ci::Build.preload(:build_schedule).find_by(id: build_id).try do |build|
break unless build.build_schedule.present?
- Ci::PlayBuildService.new(build.project, build.user).execute(build)
+ begin
+ Ci::PlayBuildService.new(build.project, build.user).execute(build)
+ ensure
+ build.unschedule
+ end
end
end
end