This may be kind of a simple question, but I haven't seen a direct answer yet. Say I'm using an Azure worker role to do some sort of long running task, say one that takes an hour. Now say MS decides that worker role needs some maintenance done on it and tries to shut it down 30 minutes into the work.
Is there a way to make Azure wait until that role finishes running to do maintenance? I do see the OnStop method, but it seems like you can only make things delay for a set amount of time before you get shut down anyway.
If this isn't possible, how do you plan around this for operations that take a decent amount of time and can't be split up into smaller chunks? Would you just rollback any changes made earlier and then retry the task?