def notify(message, time, priority, category, host)
result = Prowly.notify do |n|
n.apikey = arg(:apikey)
n.priority = map_priority(priority.to_i)
n.application = category || "God"
n.event = "on " + host.to_s
n.description = message.to_s + " at " + time.to_s
end
if result.succeeded?
self.info = "sent prowl notification to #{self.name}"
else
self.info = "failed to send prowl notification to #{self.name}: #{result.message}"
end
rescue Object => e
applog(nil, :info, "failed to send prowl notification to #{self.name}: #{e.message}")
applog(nil, :debug, e.backtrace.join("\n"))
end