// +---------------------------------------------------------------------- namespace crmeb\jobs; use app\common\repositories\store\GuaranteeRepository; use crmeb\interfaces\JobInterface; use think\facade\Log; class GauaranteeCountJob implements JobInterface { public function fire($job, $data) { try{ app()->make(GuaranteeRepository::class)->countGuarantee(); }catch (\Exception $exception){ Log::info($exception->getMessage()); } $job->delete(); } public function failed($data) { // TODO: Implement failed() method. } }