-
Notifications
You must be signed in to change notification settings - Fork 86
About stop_on_delete = true
^_^ edited this page May 17, 2015
·
2 revisions
Our deploy looks like:
deploy code
eye load config/applicationX.eye
eye restart applicationX
Here option stop_on_delete
becomes very convenient. This option means when process deleted from config, or by command :delete, it would be stopped by eye automatically.
For example we have config:
Eye.application :thins do
stop_on_delete true
group :web do
(5555..5560).each do |port|
process "thin-#{port}" do
...
end
end
end
end
it would monitor like this:
thins
web
thin-5555 ..................... up (03:41, 0%, 28Mb, <41230>)
thin-5556 ..................... up (03:41, 0%, 33Mb, <41253>)
thin-5557 ..................... up (03:41, 0%, 29Mb, <41257>)
thin-5558 ..................... up (03:41, 0%, 29Mb, <41260>)
thin-5559 ..................... up (03:41, 0%, 30Mb, <41262>)
thin-5560 ..................... up (03:41, 0%, 33Mb, <41264>)
Then we need to change ports, add more workers, ... We just change the config line (5558..5565).each do |port|
and deploy our code. Thats all, now our thins looks like:
thins
web
thin-5558 ..................... up (03:41, 0%, 31Mb, <41260>)
thin-5559 ..................... up (03:41, 0%, 30Mb, <41262>)
thin-5560 ..................... up (03:41, 0%, 34Mb, <41264>)
thin-5561 ..................... up (03:43, 0%, 34Mb, <41396>)
thin-5562 ..................... up (03:43, 0%, 33Mb, <41394>)
thin-5563 ..................... up (03:44, 0%, 29Mb, <41515>)
thin-5564 ..................... up (03:44, 0%, 35Mb, <41516>)
thin-5565 ..................... up (03:44, 0%, 28Mb, <41514>)
And thins (5555, 5556, 5557) would automatically stopped by eye (because of stop_on_delete = true
), with load
command, because load
command also call :delete, on deleted from config processes.