0.01
No release in over 3 years
Low commit activity in last 3 years
Clockwork deployment scenario for mina.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.1.0
 Project Readme

Unmaintained

Dear users of this gem! Sorry, but I no longer maintain it!

Mina + Clockwork

Clockwork deployment scenario for mina. It uses clockworkd executable to start clockwork daemon on the server. clockworkd is the part of the clockwork.

Important! You will need both clockwork and daemons gems available on the server!

Installation

# Gemfile

gem "mina-clockwork"

group :production do
  gem "daemons"  # for `clockworkd`
end

Configuration

# config/deploy.rb

require "mina/clockwork"

... set configuration options here if you need ...

task deploy: :environment do
  deploy do
    invoke :"clockwork:stop"
    ...

    on :launch do
      ...
      invoke :"clockwork:start"
    end
  end
end

Use these options to configure the plugin:

  • clockwork_dir - Daemon working dir (Default: current deployment path)
  • clockwork_file - Clock file (Default: [current deployment path]/clock.rb)
  • clockwork_identifier - Identifier of the clockworkd process (Default: name of the clock file)
  • clockwork_pid_dir - Dir for *.pid file (Default: [shared path]/tmp/pids)
  • clockwork_log_dir - Dir for *.log files (Default: [shared path]/log)

Example:

set :clockwork_file, -> { "#{fetch(:current_path)}/my_clock_file.rb"  }

Tasks

mina clockwork:restart  # Restart clockwork daemon
mina clockwork:start    # Start clockwork daemon
mina clockwork:stop     # Stop clockwork daemon

Contributing

Feel free to contribute!