smarx/WazStorageExtensions — pull request #4 by cbertolasio (2011-11-16 02:07:18+00:00)
Title: possible pull

I am not sure if you want to pull this or not. But in response to issues #2 and issues #3 that I posted in your original branch, I attempted to do the following:

- keep AutoRenewLease from throwing unhandled exceptions and crashing my worker, so I replaced background threading with Task Parallel.
- try to make leasing operations survive transient storage faults using the TransientFaultHandling policies
- try to prevent very long running tasks from executing if the lease goes away

Based on last nights testing I see that when the worker roles are running in my local emulator AND pointed to a real cloud storage account, both worker roles are able to obtain a lease BUT only 1 gets renewed. I was expecting that worker instance 0 would get the lease and then worker instance 1 would NOT get a lease because instance 0 already had one.

In addition to autorenew lease refactorings I added a sample azure 1.5 solution, a sample worker role that has a long running task, and a sample cloud project to manage the worker role and cloud configuration settings.

any code reviews or feedback would be much appreciated, and thanks a ton for getting me going on this.