using Elsa.Http.Contracts; using Microsoft.Extensions.Hosting; namespace Elsa.Http.HostedServices; /// /// Update the route table based on workflow triggers and bookmarks. /// public class UpdateRouteTableHostedService : BackgroundService { private readonly IRouteTableUpdater _routeTableUpdater; /// /// Initializes a new instance of the class. /// public UpdateRouteTableHostedService(IRouteTableUpdater routeTableUpdater) { _routeTableUpdater = routeTableUpdater; } /// protected override async Task ExecuteAsync(CancellationToken stoppingToken) { await _routeTableUpdater.UpdateAsync(stoppingToken); } }