Files
webman-buildadmin/app/process/ChannelAutoSettleTicker.php
2026-04-23 15:08:37 +08:00

23 lines
406 B
PHP

<?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);
});
}
}