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
// There is currently a lease on the blob and no lease ID was specified in the request. Status=412. It throws an Exception if the lease exists and It is already taken.
Console.WriteLine($"[{DateTime.Now.ToString("HH:mm:ss")}] This process ({pid}) is currently the leader. Press any key to exit.");
62
-
awaitTask.Delay(15000);
61
+
Console.WriteLine($"[{DateTime.Now:HH:mm:ss}] This process ({pid}) is currently the leader. Press any key to exit.");
62
+
awaitTask.Delay(15000,token);
63
63
}
64
-
},()=>{
65
-
Console.WriteLine($"[{DateTime.Now.ToString("HH:mm:ss")}] This process ({pid}) could not acquire lease. Retrying in 20 seconds. Press any key to exit.");
64
+
},async()=>{
65
+
Console.WriteLine($"[{DateTime.Now:HH:mm:ss}] This process ({pid}) could not acquire lease. Retrying in 20 seconds. Press any key to exit.");
66
66
});
67
67
68
68
// Wait for completion of the DistributedMutex and the UI task before exiting
-[Azurite emulator for local Azure Storage development](https://learn.microsoft.com/azure/storage/common/storage-use-azurite) or an [Azure Storage Account](https://learn.microsoft.com/azure/storage/common/storage-account-create)
17
17
18
18
#### Optional
@@ -44,8 +44,8 @@ Install the prerequisites and follow the steps to run the example and observe th
44
44
#### Running with Azurite storage emulator
45
45
46
46
The included `app.config` file is set up to use a local Azure Storage emulator. Open a new terminal window, navigate to an empty working directory for the Azurite data files, and start the emulator with the command `azurite`, or `npx azurite` if you installed via `npm`.
47
-
Azure SDKs by DefaultAzureCredencials needs https, and azurite by default is http. Follow the instructions [here](https://learn.microsoft.com/azure/storage/common/storage-use-azurite?tabs=visual-studio%2Cblob-storage#azure-sdks).
48
-
In `LeaderElectionConsoleWorker/app.config` you see `https://127.0.0.1:10000/devstoreaccount1`
47
+
Azure SDKs by DefaultAzureCredential needs https, and Azurite by default is http. Follow the instructions [here](https://learn.microsoft.com/azure/storage/common/storage-use-azurite?tabs=visual-studio%2Cblob-storage#azure-sdks).
48
+
In `LeaderElectionConsoleWorker/app.config` you see `https://127.0.0.1:10000/devstoreaccount1` (This is the Blob service endpoint Azurite exposes for the devstoreaccount1 account.)
0 commit comments