Closed jbmyid closed 6 years ago
def on_my_check(process)
process.info "test"
process.execute_async "sendxmpp -s 'hhahahaa' someone@jabber.org"
File.open("/tmp/triggered.txt", "w") { |f| f.write 1 }
end
Eye.app :bla do
process :a do
# ...
check :memory, every: 20.seconds, below: 300.megabytes, times: 3,
fires: [-> { on_my_check(self) }, :restart]
end
end
Thanks I will try this.
Is there any way to run some code when the memory/cpu of process reaches some value.
I have an scenario for debugging purpose where I have to run some code when memory of the process reaches to certain value.