优化数据归属问题
This commit is contained in:
22
app/process/ChannelAutoSettleTicker.php
Normal file
22
app/process/ChannelAutoSettleTicker.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user