-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding support Faraday-retry * Annontate is not loaded by default * Upgrading to report close_events task status * Improved db_cleanup task * Improved clean_active_sessions task * Adding Whenever gem * Setting required:false * Initial schedule file used by whenever * First scheduled jobs * Code cleaning and misc fixes to better deploy * Testing a new Capistrano config * Making sure whenever write jobs that have proper access to the bundler * Experimenting with Capistrano and Sidekiq * Better Poll list display on small screens * Fixing a typo
- Loading branch information
Showing
13 changed files
with
199 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Use this file to easily define all of your cron jobs. | ||
# | ||
# It's helpful, but not entirely necessary to understand cron before proceeding. | ||
# http://en.wikipedia.org/wiki/Cron | ||
|
||
# Example: | ||
# | ||
# set :output, "/path/to/my/cron_log.log" | ||
# | ||
# every 2.hours do | ||
# command "/usr/bin/some_great_command" | ||
# runner "MyModel.some_method" | ||
# rake "some:great:rake:task" | ||
# end | ||
# | ||
# every 4.days do | ||
# runner "AnotherModel.prune_old_records" | ||
# end | ||
|
||
# Learn more: http://github.com/javan/whenever | ||
|
||
# Fix an issue when using rbenv (at least) | ||
env :PATH, ENV['PATH'] | ||
|
||
set :output, "log/cron.log" | ||
|
||
# Clear Active Sessions from sessions that are tooooo long | ||
every 6.hours do | ||
rake 'clean_active_sessions:clean[false]' | ||
end | ||
|
||
# Close Events | ||
every 1.day do | ||
rake 'close_events:close_events[false]' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace :sidekiq do | ||
after 'deploy:starting', 'sidekiq:stop' | ||
after 'deploy:finished', 'sidekiq:start' | ||
|
||
task :stop do | ||
on roles(:app) do | ||
within current_path do | ||
# execute(:sudo, 'systemctl kill -s TSTP sidekiq') | ||
execute(:sudo, 'systemctl stop sidekiq') | ||
end | ||
end | ||
end | ||
|
||
task :start do | ||
on roles(:app) do |host| | ||
execute(:sudo, 'systemctl start sidekiq') | ||
info "Host #{host} (#{host.roles.to_a.join(', ')}):\t#{capture(:uptime)}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.