пʼятниця, 5 березня 2010 р.

Using monit to watch delayed_job on rails

I've been fighting for some time to successfully start/stop the delayed_job deamon ('daemons' gem) via monit from under another user and this is what I've ended up with:

check process delayed_job with pidfile /home/me/myapp/shared/pids/job_runner.pid
start program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job start" as uid me and gid mygroup
stop program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job stop" as uid me and gid mygroup

четвер, 11 лютого 2010 р.

bash_history

history | awk {'print $2'} | sort | uniq -c | sort -rn | head
59 sudo
58 ls
41 svn
23 cd
18 cap
17 pyramid_dir
16 rake
16 nano
14 rm
13 script/plugin