Target: understanding policies and the process manager.
Edit and run alert-if-temperature-below-zero.php.
- create a new
WhenTemperatureBelowZeroSendAlert
Policy
- create a new
SendTemperateBelowZeroAlert
Command
- create a new
HandleSendTemperateBelowZeroAlert
CommandHandler
It should only print some alert message toSTDERR
viaerror_log()
, for now. - wire it together with
ProcessPolicies
- run it, see if you can get the alerts fired
Question: what happens when you run the script multiple times? Question: what happens when new events appear, and you run the script again? Question: how should we deal with failures/crashes here?