I have a WebJob with a function with the singleton attribute [Singleton("test", SingletonScope.Host)]. When starting the webjob the logging mentions that the lock was acquired but the lock is not actually created.
The reason for that was that I forgot to include AddAzureStorageCoreService to the ConfigureWebjobs
as opposed to
The issue is that the logs report the lock was acquired but in reality it was not.
Repro steps
In a webjob, use [Singleton("Test", SingletonScope.Host)] on a function.
In program.cs configure webjobs as follows:
.ConfigureWebJobs(j => { })
Start the webjob
Logging reads
Singleton lock acquired (xxxxxxxe6db0708bd54f3eb745a7ed82/test)
No folder 'xxxxxxxe6db0708bd54f3eb745a7ed82' exists in the storage account > azure-webjobs-hosts
Expected behavior
When the lock is not created I want to see the lock was not created in the logging.
Actual behavior
The lock is not created but the logging mentions is was acquired.
Adding this to triaged as we can improve the experience here by handling scenarios where a distributed lock manager is required, but a truly distributed lock manager is not registered.
I have a WebJob with a function with the singleton attribute
[Singleton("test", SingletonScope.Host)]
. When starting the webjob the logging mentions that the lock was acquired but the lock is not actually created.The reason for that was that I forgot to include AddAzureStorageCoreService to the ConfigureWebjobs
as opposed to
The issue is that the logs report the lock was acquired but in reality it was not.
Repro steps
In a webjob, use [Singleton("Test", SingletonScope.Host)] on a function. In program.cs configure webjobs as follows:
.ConfigureWebJobs(j => { })
Start the webjob
Logging reads
Singleton lock acquired (xxxxxxxe6db0708bd54f3eb745a7ed82/test)
No folder 'xxxxxxxe6db0708bd54f3eb745a7ed82' exists in the storage account > azure-webjobs-hostsExpected behavior
When the lock is not created I want to see the lock was not created in the logging.
Actual behavior
The lock is not created but the logging mentions is was acquired.
Known workarounds
N/A
Related information