Refactor sync_environment methods

* Add delete_environment method
* Change return value to allow raising an exception
This commit is contained in:
Sebastian Serth
2021-11-04 01:03:12 +01:00
parent 38e1f5b486
commit ecf470bddd
10 changed files with 106 additions and 31 deletions

View File

@ -177,6 +177,8 @@ class ExecutionEnvironmentsController < ApplicationController
success = ExecutionEnvironment.all.map do |execution_environment|
Runner.strategy_class.sync_environment(execution_environment)
rescue Runner::Error
false
end
if success.all?
redirect_to ExecutionEnvironment, notice: t('execution_environments.index.synchronize_all.success')