Custom IBackgroundTaskQueue seems to have corrupte...
# help-with-umbraco
k
To setup background recurring jobs in Umbraco 13, we accidentally followed an old guide and implemented a custom
IBackgroundTaskQueue
. We then registered this custom
IBackgroundTaskQueue
with DI using
services.AddSingleton<IBackgroundTaskQueue, CustomBackgroundTaskQueue>();
. This worked fine, but then we realized our background task queue was processing internal Umbraco work items. So we removed it, replaced with a proper recurring job according to the docs, and redeployed, and that completely screwed things up, consistently across all environments we deployed to. When removing our custom
IBackgroundTaskQueue
all Umbraco tasks seems to fail, and the logs contain massive amounts of "The Scope being disposed is not the Ambient Scope". Even when removing all custom stuff related to recurring jobs and queues these errors persisted after redeploying. So we brought back the custom
IBackgroundTaskQueue
and redeployed, and now all the errors have gone away. Have we accidentally replaced Umbraco's internal background task queue somehow? And how does this replacement survive restarts and temp folder clears etc? Where would this be stored? In the database? Where? This is running in single-instance Azure web apps, if it makes a difference.
9 Views