smarx/WazStorageExtensions — Issue #3: how should the AutoRenewLease class notify users of the class when it cannot renew a lease?
Author: cbertolasio
Created: 2011-11-13 16:02:52+00:00
State: open

So, I wanted to say thanks again for the AutoRenewLease class. The concept is really cool, and it's something that I have been trying to work into one of my worker roles.

The AutoRenewLease tries to keep the lease alive by doing the RenewLease in the background. I may have some Task running in my my worker role that when the task starts, it creates an instance of AutoRenewLease, and when my task is done, it destorys auto renew lease.

If my task can ONLY continue working while the lease is alive, what would be a good pattern to follow, such that AutoRenewLease could notify my task if the lease could not be renewed. i.e. my task is in the middle of it's run operation, and the renew fails, and now I need to cancel my task's run bits, and rollback any changes.

Thoughts?