This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async Task Main() | |
{ | |
// Name of the tool. | |
const string toolName = "ImportTool"; | |
// Simulate a job that runs for 2 minutes. | |
var job = new Task(() => { | |
Thread.Sleep(TimeSpan.FromMinutes(2)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DistributedMutex { | |
private readonly string key; | |
private readonly string storageConnectionString; | |
private readonly string storageContainerName; | |
private CloudBlobClient blobClient; | |
private string leaseId; | |
public DistributedMutex(string storageConnectionString, string storageContainerName, string key) | |
{ | |
this.key = key; |