<?php

declare(strict_types=1);

namespace app\process;

use app\common\service\ChannelSettlementService;
use Workerman\Timer;

/**
 * 渠道周期自动结算（每 60 秒扫描一次）
 */
class ChannelAutoSettleTicker
{
    public function onWorkerStart(): void
    {
        Timer::add(60, static function (): void {
            ChannelSettlementService::settleAllDueChannels(0);
        });
    }
}

