mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Updating chef recipe
Pulled in some updates from the project that spawned the cookbook.
This commit is contained in:
parent
c744b4854e
commit
d9793e09b6
4 changed files with 8 additions and 9 deletions
|
@ -5,3 +5,7 @@ Sidekiq is a Redis-backed Ruby library for creating background jobs, placing tho
|
||||||
= USAGE:
|
= USAGE:
|
||||||
|
|
||||||
add require_recipe "sidekiq" to main/recipes/default.rb
|
add require_recipe "sidekiq" to main/recipes/default.rb
|
||||||
|
|
||||||
|
= NOTES:
|
||||||
|
|
||||||
|
I setup a basic size for the Sidekiq workers based on the instance_type, if you need more or less workers please modify the recipe itself.
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
# Cookbook Name:: sidekiq
|
# Cookbook Name:: sidekiq
|
||||||
# Recipe:: default
|
# Recipe:: default
|
||||||
#
|
#
|
||||||
if ['solo', 'util'].include?(node[:instance_role])
|
role = node[:instance_role]
|
||||||
|
if role == 'solo' || (role == 'util' && node[:name] =~ /sidekiq/)
|
||||||
|
|
||||||
# for now
|
# for now
|
||||||
worker_count = 1
|
worker_count = 1
|
||||||
|
|
|
@ -140,13 +140,13 @@ APP_SHARED="${APP_DIR}/shared"
|
||||||
APP_CONFIG="${APP_SHARED}/config"
|
APP_CONFIG="${APP_SHARED}/config"
|
||||||
|
|
||||||
if [ -e "${APP_CONFIG}/${CONF_FILE}" ]; then
|
if [ -e "${APP_CONFIG}/${CONF_FILE}" ]; then
|
||||||
logger -t "sidekiq_${APP}" -s "Good, found a config file. Proceeding..."
|
logger -t "sidekiq_${APP}" -s "Good, found a conf file. Proceeding..."
|
||||||
else
|
else
|
||||||
logger -t "sidekiq_${APP}" -s "/data/${APP}/shared/config/${CONF_FILE} not found for app: ${APP}"
|
logger -t "sidekiq_${APP}" -s "/data/${APP}/shared/config/${CONF_FILE} not found for app: ${APP}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WORKER_REF=`echo $CONF_FILE | sed s/.yml.conf//`
|
WORKER_REF=`echo $CONF_FILE | sed s/.conf//`
|
||||||
LOG_FILE="$APP_ROOT/log/$WORKER_REF.log"
|
LOG_FILE="$APP_ROOT/log/$WORKER_REF.log"
|
||||||
LOCK_FILE="/tmp/$WORKER_REF.monit-lock"
|
LOCK_FILE="/tmp/$WORKER_REF.monit-lock"
|
||||||
PID_FILE="/var/run/engineyard/sidekiq/$APP/$WORKER_REF.pid"
|
PID_FILE="/var/run/engineyard/sidekiq/$APP/$WORKER_REF.pid"
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
<% if @verbose %>
|
<% if @verbose %>
|
||||||
:verbose: <%= @verbose %>
|
:verbose: <%= @verbose %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @namespace %>
|
|
||||||
:namespace: <%= @namespace %>
|
|
||||||
<% end %>
|
|
||||||
<% if @server %>
|
|
||||||
:server: <%= @server %>
|
|
||||||
<% end %>
|
|
||||||
<% if @environment %>
|
<% if @environment %>
|
||||||
:environment: <%= @environment %>
|
:environment: <%= @environment %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue