27 lines
554 B
PHP
27 lines
554 B
PHP
<?php
|
|
|
|
namespace app\process;
|
|
|
|
use app\support\OrderLogisticsSyncService;
|
|
use support\Log;
|
|
use Workerman\Timer;
|
|
|
|
class Kuaidi100LogisticsSyncProcess
|
|
{
|
|
public function __construct()
|
|
{
|
|
Timer::add(600, [$this, 'syncDue'], [], true);
|
|
}
|
|
|
|
public function syncDue(): void
|
|
{
|
|
try {
|
|
(new OrderLogisticsSyncService())->syncDue(50);
|
|
} catch (\Throwable $e) {
|
|
Log::warning('kuaidi100 logistics sync process failed', [
|
|
'message' => $e->getMessage(),
|
|
]);
|
|
}
|
|
}
|
|
}
|