Giter VIP home page Giter VIP logo

mina-sidekiq's Introduction

mina-sidekiq

Build Status

mina-sidekiq is a gem that adds tasks to aid in the deployment of Sidekiq using Mina.

Starting with 1.0.0 this gem requires Mina 1.0! (thanks @devvmh)

Getting Start

Installation

gem install mina-sidekiq

Example

require 'mina_sidekiq/tasks'
#...

task :setup do
  # sidekiq needs a place to store its pid file and log file
  command %(mkdir -p "#{fetch(:deploy_to)}/shared/pids/")
  command %(mkdir -p "#{fetch(:deploy_to)}/shared/log/")
end

task :deploy do
  deploy do
    # stop accepting new workers
    invoke :'git:clone'
    invoke :'sidekiq:quiet'
    invoke :'deploy:link_shared_paths'
    ...

    on :launch do
      ...
      invoke :'sidekiq:restart'
    end
  end
end

Available Tasks

  • sidekiq:stop
  • sidekiq:start
  • sidekiq:restart
  • sidekiq:quiet
  • sidekiq:log

Available Options

Option Description
sidekiq Sets the path to sidekiq.
sidekiqctl Sets the path to sidekiqctl.
sidekiq_timeout Sets a upper limit of time a worker is allowed to finish, before it is killed.
sidekiq_log Sets the path to the log file of sidekiq.
sidekiq_pid Sets the path to the pid file of a sidekiq worker.
sidekiq_processes Sets the number of sidekiq processes launched.

Testing

The test requires a local running ssh server with the ssh keys of the current user added to its ~/.ssh/authorized_keys. In OS X, this is "Remote Login" under the Sharing pref pane. You will also need a working rvm installation.

To run the full blown test suite use:

bundle exec rake test

For faster release cycle use

cd test_env
bundle exec mina deploy --verbose

Copyright

Copyright (c) 2016 Jörg Thalheim [email protected]

See LICENSE for further details.

mina-sidekiq's People

Contributors

mic92 avatar devvmh avatar x-yuri avatar avaelkross avatar brycejohnston avatar sobrinho avatar mperham avatar pgeraghty avatar phansch avatar prasadsurase avatar raecoo avatar lazybios avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.