start: added SIDEKIQ_CONCURRENCY env variable to configure the concurrency level of sidekiq

This commit is contained in:
Sameer Naik 2013-10-11 11:01:21 +05:30
parent 9330660032
commit 157f4166a8
2 changed files with 9 additions and 0 deletions

View File

@ -56,6 +56,11 @@ production:
EOF
chmod o-rwx config/database.yml
sudo -u git -H tee config/sidekiq.yml <<EOF
:concurrency: {{SIDEKIQ_CONCURRENCY}}
EOF
chmod o-rwx config/sidekiq.yml
# make sure everything in /home/git is owned by the git user
chown -R git:git /home/git/

View File

@ -8,6 +8,7 @@ REDIS_HOST=${REDIS_HOST:-localhost}
REDIS_PORT=${REDIS_PORT:-6379}
UNICORN_WORKERS=${UNICORN_WORKERS:-2}
SIDEKIQ_CONCURRENCY=${SIDEKIQ_CONCURRENCY:-5}
DB_HOST=${DB_HOST:-localhost}
DB_NAME=${DB_NAME:-gitlabhq_production}
@ -73,6 +74,9 @@ sudo -u git -H sed 's/{{DB_USER}}/'${DB_USER}'/' -i /home/git/gitlab/config/data
sudo -u git -H sed 's/{{DB_PASS}}/'${DB_PASS}'/' -i /home/git/gitlab/config/database.yml
sudo -u git -H sed 's/{{DB_POOL}}/'${DB_POOL}'/' -i /home/git/gitlab/config/database.yml
# configure sidekiq
sudo -u git -H sed 's/{{SIDEKIQ_CONCURRENCY}}/'${SIDEKIQ_CONCURRENCY}'/' -i /home/git/gitlab/config/sidekiq.yml
# configure redis
sudo -u git -H sed 's/redis.example.com:6379/'${REDIS_HOST}':'${REDIS_PORT}'/' -i /home/git/gitlab/config/resque.yml