Sha256: 48115690423547da2c8f789c85cb7795735feb26bfe1c00838f70dc347888d26

Contents?: true

Size: 842 Bytes

Versions: 6

Compression:

Stored size: 842 Bytes

Contents

namespace :sidekiq do
  desc 'Install sidekiq'

  namespace :systemd do
    task :setup do
      on roles(:web) do
        template 'sidekiq_systemd.erb', '/tmp/sidekiq.service'
        sudo 'mv /tmp/sidekiq.service /etc/systemd/system/sidekiq.service'
        sudo 'systemctl daemon-reload'
        sudo 'systemctl enable sidekiq'
        sudo 'systemctl start sidekiq'
      end
    end

    task :unload do
      on roles(:web) do
        sudo 'systemctl kill -s TSTP sidekiq'
      end
    end

    task :restart do
      on roles(:web) do
        sudo 'systemctl restart sidekiq'
      end
    end
  end

  namespace :supervisor do
    task :uninstall do
      on roles(:sidekiq) do
        sudo 'rm /etc/supervisor/conf.d/sidekiq.conf'
        sudo 'supervisorctl reread'
        sudo 'supervisorctl update'
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pixelforce_recipes-3.8 lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb
pixelforce_recipes-3.7 lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb
pixelforce_recipes-3.6 lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb
pixelforce_recipes-3.5 lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb
pixelforce_recipes-3.4 lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb
pixelforce_recipes-3.3 lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb