123456789101112131415161718192021222324 |
- <?php
- namespace ln\listens;
- use ln\interfaces\ListenerInterface;
- use ln\jobs\GauaranteeCountJob;
- use ln\services\TimerService;
- use think\facade\Log;
- class GuaranteeCountListen extends TimerService implements ListenerInterface
- {
- public function handle($event): void
- {
- $this->tick(1000 * 60 * 15, function () {
- try {
- queue(GauaranteeCountJob::class,[]);
- } catch (\Exception $e) {
- Log::info('自动更新保障服务数量失败' . var_export($e, true));
- }
- });
- }
- }
|