// +---------------------------------------------------------------------- namespace crmeb\jobs; use crmeb\interfaces\JobInterface; use app\common\repositories\store\product\ProductRepository; class SetSeckillStockCacheJob implements JobInterface { public function fire($job, $data) { try{ $spu = app()->make(ProductRepository::class)->seckillStockCache($data['res'], $data['attrValue']); }catch (\Exception $e){ halt($e->getMessage()); } $job->delete(); } public function failed($data) { // TODO: Implement failed() method. } }