// +---------------------------------------------------------------------- namespace crmeb\listens; use app\common\repositories\community\CommunityTopicRepository; use crmeb\interfaces\ListenerInterface; use crmeb\services\TimerService; class SumCountListen extends TimerService implements ListenerInterface { public function handle($event): void { $this->tick(1000 * 10 * 5, function () { app()->make(CommunityTopicRepository::class)->sumCountUse(null); }); } }