Are you using god 0.7.11?

On Nov 19, 4:27 am, Thomas K <[EMAIL PROTECTED]> wrote:
> Can anybody tell me why conditions do not work in a lifecycle?
>
> I just want to get notifications if for example the memory commit is
> very high, but I don't want any transition.
>
> This does not seem to work....
>      w.lifecycle do |on|
>        on.condition(:memory_usage) do |c|
>          c.notify = 'it'
>          c.interval = 60
>          c.above = 150.megabytes
>          c.times = [3, 5]
>        end
>
>        on.condition(:cpu_usage) do |c|
>          c.notify = 'it'
>          c.interval = 20
>          c.above = 50.percent
>          c.times = [3, 5]
>        end
>     end
>
> In the meantime I managed to monitor my processes using transitions,
> but that seems more like a hack (but maybe helps other people who are
> trying the same):
>
>      # monitoring
>      w.transition(:up, nil) do |on|
>        on.condition(:memory_usage) do |c|
>          c.notify = 'it'
>          c.interval = 60
>          c.above = 150.megabytes
>          c.times = [3, 5]
>        end
>
>        on.condition(:cpu_usage) do |c|
>          c.notify = 'it'
>          c.interval = 20
>          c.above = 50.percent
>          c.times = [3, 5]
>        end
>      end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/god-rb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to