-----BEGIN PGP SIGNED MESSAGE-----
On Jan 20, 2011, at 5:38 PM, Brian Akins wrote:
So, if I wanted this service to be able to notify others ( by calling new_resource.updated_by_last_action(true), right?) how could I know if the directory, for example, got created, so I’d want to pass that notify up? Asked another way: how do I pass along the updated status of the underlying resources if I use them in an LWRP.
They’re just resources, so they can be accessed like any others through a notification handler. You’d need to use subscribes.
daemontools_service “my_service” do
file “/tmp/i_got_updated_by_a_directory” do
subscribes :create, "directory[/etc/service/my_service]"
However, I probably wouldn’t do that, and instead notify/subscribe the LWRP resource.
Joshua Timberman, Technical Evangelist
IRC, Skype, Twitter, Github: jtimberman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
-----END PGP SIGNATURE-----