Use fire_state_event

This commit is contained in:
Shinya Maeda 2018-11-06 11:45:39 +09:00
parent 5f47ebaa6c
commit 56226498bf
1 changed files with 1 additions and 1 deletions

View File

@ -31,6 +31,6 @@ class BuildSuccessWorker
##
# TODO: This should be processed in DeploymentSuccessWorker once we started storing `action` value in `deployments` records
def stop_environment(build)
build.persisted_environment.stop
build.persisted_environment.fire_state_event(:stop)
end
end