123456789101112131415161718192021222324 |
- <?php
- namespace ln\listens;
- use app\common\repositories\user\UserRepository;
- use ln\interfaces\ListenerInterface;
- use ln\services\TimerService;
- use ln\services\YunxinSmsService;
- use Swoole\Timer;
- class SyncSpreadStatusListen extends TimerService implements ListenerInterface
- {
- public function handle($event): void
- {
- $this->tick(1000 * 10, function () {
- request()->clearCache();
- app()->make(UserRepository::class)->syncSpreadStatus();
- });
- }
- }
|