Files
tiku-backend.net/Tiku.Infrastructure/Tenancy/TenantDomainRecheckJobHandler.cs
xiong 7adcb6a3d5
Some checks failed
ci / release-gate (push) Has been cancelled
refactor(jobs): modularize background job handlers
2026-08-03 13:28:21 +08:00

20 lines
678 B
C#

using System.Text.Json;
using Tiku.Application.Jobs;
using Tiku.Application.Tenancy;
namespace Tiku.Infrastructure.Tenancy;
internal sealed class TenantDomainRecheckJobHandler(ITenantDomainLifecycleService lifecycleService)
: IBackgroundJobHandler
{
public string JobType => "tenant_domain_recheck";
public async Task<BackgroundJobHandlerResult> HandleAsync(
BackgroundJobExecutionContext context,
CancellationToken cancellationToken = default)
{
var processed = await lifecycleService.ProcessPendingAsync(cancellationToken);
return new BackgroundJobHandlerResult(JsonSerializer.SerializeToElement(new { processed }));
}
}