worker-services

Installation
SKILL.md

Worker Services and Background Tasks

BackgroundService (Preferred)

public sealed class OrderProcessingWorker(
    IServiceScopeFactory scopeFactory,
    ILogger<OrderProcessingWorker> logger) : BackgroundService
{
    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    {
        logger.LogInformation("Order processing worker started");

        while (!stoppingToken.IsCancellationRequested)
        {
            try
            {
                using var scope = scopeFactory.CreateScope();
                var orderService = scope.ServiceProvider.GetRequiredService<IOrderService>();
Installs
11
GitHub Stars
14
First Seen
Apr 4, 2026
worker-services — lobbi-docs/claude