diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-06-01 16:01:32 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-06-01 16:01:32 +0300 |
commit | a0990ff356e05ba7321c9295f39955dfed66b7aa (patch) | |
tree | fc1b6ed83d0e693e50fffd097d2260c611235125 /app/workers/build_success_worker.rb | |
parent | 66edbc5e5cfe49984069512a9e550df9498497d8 (diff) |
Simplify CreateDeploymentService so that it uses
methods directly from job, avoid duplicating the works.
Diffstat (limited to 'app/workers/build_success_worker.rb')
-rw-r--r-- | app/workers/build_success_worker.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/workers/build_success_worker.rb b/app/workers/build_success_worker.rb index e17add7421f..bf009dfab0f 100644 --- a/app/workers/build_success_worker.rb +++ b/app/workers/build_success_worker.rb @@ -11,15 +11,6 @@ class BuildSuccessWorker private def create_deployment(build) - service = CreateDeploymentService.new( - build.project, build.user, - environment: build.environment, - sha: build.sha, - ref: build.ref, - tag: build.tag, - options: build.options.to_h[:environment], - variables: build.variables) - - service.execute(build) + CreateDeploymentService.new(build).execute end end |