вторник, 20 января 2009 г.

Обработка в background

http://github.com/imedo/background/tree/master
   background do
# do some time-consuming task
end
daemon_generator
http://github.com/dougal/daemon_generator/tree/master
To get yourself rolling:
> sudo gem install daemons
> ./script/generate daemon

Then insert your code in the lib/daemons/.rb stub. All pid's and logs will live in the normal log/ folder. This
helps to make things Capistrano friendly.

Individual control script:
> ./lib/daemons/_ctl [start|stop|restart]

App-wide control script (I add this to my capistrano recipe's after_restart task):
> ./script/daemons [start|stop|restart]

Комментариев нет:

Отправить комментарий