YaeBlog/YaeBlog/Services/BlogHostedService.cs
jackfiled 3aae468e65
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 1m15s
feat: 从Bootstrap迁移到Tailwind css (#9)
Reviewed-on: #9
2025-01-24 16:46:56 +08:00

18 lines
470 B
C#

namespace YaeBlog.Services;
public class BlogHostedService(
ILogger<BlogHostedService> logger,
RendererService rendererService) : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
logger.LogInformation("Failed to load cache, render essays.");
await rendererService.RenderAsync();
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}