1
0
Fork 0
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:
jc00ke 2012-03-21 20:44:21 -07:00
parent c744b4854e
commit d9793e09b6
4 changed files with 8 additions and 9 deletions

View file

@ -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.

View file

@ -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

View file

@ -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"

View file

@ -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 %>