lib/negroku/tasks/eye.rake in negroku-2.0.3 vs lib/negroku/tasks/eye.rake in negroku-2.1.0

- old
+ new

@@ -1,7 +1,6 @@ require 'negroku/helpers/templates' - ## eye.rb # # Adds eye variables and tasks namespace :load do @@ -19,10 +18,15 @@ # Add eye to :rbenv_map_bins fetch(:rbenv_map_bins) << 'eye' end end +namespace :env do + desc 'Env variables changed' + task :changed do + end +end namespace :eye do desc "Loads eye config and starts monitoring" task :load do @@ -76,9 +80,15 @@ end end before "deploy:published", "negroku:eye:setup" after "negroku:eye:setup", "eye:load" + + after 'env:changed', 'hard-restart' do + invoke 'eye:stop' + invoke 'eye:load' + invoke 'eye:start' + end define_logs(:eye, { app: 'eye.log' })