HostedService using MediaService reports success, ...
# help-with-umbraco
l
I have a hosted service registered with a queue and a scoped handler that reacts on the content published notification. In it I either create or update
IMedia
using
media.SetValue
and
mediaService.Save(media)
. I can refresh the media in the backoffice and see the changes. However, they are not there in the published cache, and no "history entry" is recorded. Also when the process is restarted, the changes are gone. I've experimented with
IScopeProvider.CreateScope()
and
scope.Complete()
, but it does not help. (Scope should be immediately disposed) Have not traced the SQL yet, but I presume it's never really written or committed. Any help appreciated. 😅
For anyone coming by later, it helps to complete outer scopes you've created and forgot about months ahead. 🤦‍♂️
2 Views