You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Well, the way it works now is that an exception is thrown when the lease can't be renewed. It should be quite exceptional that the lease can't be renewed (means a network error, some sort of timing issue where the thread didn't wake up soon enough, or another process explicitly breaking the lease).
If you want something more interactive, I would suggest not using an AutoRenewLease and just writing code (a loop?) where you renew periodically and just check whether that succeeds.
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?
The text was updated successfully, but these errors were encountered: