diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 22:33:29 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 22:33:29 +0000 |
commit | b112a33b98c657b1d2838c14d598a291a14565e0 (patch) | |
tree | a37cc22491baf419a15b81918ee07c2fd0d8f2da /app/controllers/projects/clusters_controller.rb | |
parent | 4441ca4ba7bf6c4a68574d018d2bf48e45326654 (diff) | |
parent | 5c4eace67f188da436b3b380a0125d053b29422a (diff) | |
download | gitlab-ce-sentiment-analysis.tar.gz |
Merge branch 'master' into 'sentiment-analysis'sentiment-analysis
# Conflicts:
# app/assets/javascripts/notes/components/comment_form.vue
Diffstat (limited to 'app/controllers/projects/clusters_controller.rb')
-rw-r--r-- | app/controllers/projects/clusters_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb index 142e8b6e4bc..aeaba3a0acf 100644 --- a/app/controllers/projects/clusters_controller.rb +++ b/app/controllers/projects/clusters_controller.rb @@ -4,6 +4,7 @@ class Projects::ClustersController < Projects::ApplicationController before_action :authorize_create_cluster!, only: [:new] before_action :authorize_update_cluster!, only: [:update] before_action :authorize_admin_cluster!, only: [:destroy] + before_action :update_applications_status, only: [:status] STATUS_POLLING_INTERVAL = 10_000 @@ -114,4 +115,8 @@ class Projects::ClustersController < Projects::ApplicationController def authorize_admin_cluster! access_denied! unless can?(current_user, :admin_cluster, cluster) end + + def update_applications_status + @cluster.applications.each(&:schedule_status_update) + end end |