From f1de48f2039dfe539e94e5ab8b1f5670e620972d Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 15 Feb 2020 15:31:59 +0800 Subject: [PATCH] add auto restart after bundle update --- temp_file/playground_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/temp_file/playground_controller.rb b/temp_file/playground_controller.rb index 4a40aab..a662d30 100644 --- a/temp_file/playground_controller.rb +++ b/temp_file/playground_controller.rb @@ -140,6 +140,9 @@ class Admin::PlaygroundController < OrbitAdminController end mul.status['alive'] = false mul.save + Thread.new do + Bundler.with_clean_env{system("kill -s USR2 `cat tmp/pids/unicorn.pid`")} + end end rescue => e mul.status['alive'] = false