Sha256: 9c0bde2d0a7664f3f912755c4aeaf1b061dd37067e1ef1aa35eb09c53c2bd8e1

Contents?: true

Size: 727 Bytes

Versions: 32

Compression:

Stored size: 727 Bytes

Contents

if Capistrano::Configuration.instance(false)
  Capistrano::Configuration.instance(true).load do |instance|
    namespace :sidekiq do
      desc "Install sidekiq"

      desc "Setup sidekiq configuration for this application"
      task :setup, roles: :sidekiq do
        template "sidekiq_init.erb", "/tmp/sidekiq"
        run "#{sudo} mv /tmp/sidekiq /etc/init.d/sidekiq"
        run "#{sudo} chmod +x /etc/init.d/sidekiq"
        run "#{sudo} update-rc.d sidekiq defaults"
      end
      # after "deploy:setup", "nginx:setup"
      
      %w[start stop restart].each do |command|
        desc "#{command} sidekiq"
        task command do
          run "/etc/init.d/sidekiq #{command}"
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
pixelforce_recipes-3.9.2 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.9.1 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.9 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.8 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.7 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.6 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.5 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.4 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.3 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.2 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.1 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-3.0 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-2.4 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-2.3 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-2.1 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-2.0 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-1.8 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-1.6 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-1.5 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb
pixelforce_recipes-1.4 lib/pixelforce_recipes/legacy_recipes/sidekiq.rb