Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
Expand Down Expand Up @@ -69,21 +69,25 @@ public DistributedJobService(
if (job is null)
{
// No runnable jobs for now.
scope.Complete();
return null;
}

job.LastAttemptedRun = DateTime.UtcNow;
job.IsRunning = true;
_distributedJobRepository.Update(job);
scope.Complete();

IDistributedBackgroundJob? distributedJob = _distributedBackgroundJobs.FirstOrDefault(x => x.Name == job.Name);

if (distributedJob is null)
{
_logger.LogWarning("Could not find a distributed job with the name '{JobName}'", job.Name);
}

scope.Complete();
else
{
_logger.LogDebug("Running distributed job with the name '{JobName}'", job.Name);
}

return distributedJob;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.PublishedCache.HybridCache</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests</_Parameter1>
</AssemblyAttribute>
Expand All @@ -89,8 +92,5 @@
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Cms.Infrastructure</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project>
Loading
Loading