Restored interface methods on obsolete IBackgroundTaskQueue (#19223)

* Restore interface methods on obsolete IBackgroundTaskQueue.

* Fixed typos in comment.
This commit is contained in:
Andy Butland
2025-05-05 07:38:31 +02:00
committed by GitHub
parent fc1455e0d8
commit 0ad020f0ce
2 changed files with 10 additions and 1 deletions

View File

@@ -9,4 +9,13 @@ namespace Umbraco.Cms.Infrastructure.HostedServices;
[Obsolete("This has been relocated into Umbraco.Cms.Core. This definition in Umbraco.Cms.Infrastructure is scheduled for removal in Umbraco 17.")]
public interface IBackgroundTaskQueue : Core.HostedServices.IBackgroundTaskQueue
{
/// <summary>
/// Enqueue a work item to be executed in the background.
/// </summary>
void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem);
/// <summary>
/// Dequeue the first item on the queue.
/// </summary>
Task<Func<CancellationToken, Task>?> DequeueAsync(CancellationToken cancellationToken);
}