forked from diaspora/diaspora
-
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.
cronjob to restart sidekiq workers daily, might help with the memoryo…
…verflow
- Loading branch information
Lennart Prelle
committed
Aug 11, 2014
1 parent
6ef6241
commit 4b59a36
Showing
2 changed files
with
17 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
num_sidekiq_workers = 2 | ||
rails_root = ENV['RAILS_ROOT'] || "/home/lprelle/diaspora" | ||
|
||
every 1.day, :at => '1am' do | ||
num_sidekiq_workers.times do |num| | ||
command "kill -USR1 $(cat #{rails_root}/pids/sidekiq#{num}.pid)" | ||
end | ||
end | ||
|
||
every 1.day, :at => '1:01 am' do | ||
num_sidekiq_workers.times do |num| | ||
command "kill -TERM $(cat #{rails_root}/pids/sidekiq#{num}.pid)" | ||
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
use clean command again, when configurable pid file dir is available
mojombo/god#174