everyMinute(); // $this->everyMinute(); } /** * 监听企业认证回调 is_callback=1 表示回调成功 */ protected function execute() { $redis = RedisLogic::getInstance(); //...具体的任务执行 $companyIdList = $redis->keys('authentication_company_id_*'); foreach ($companyIdList as $key) { $data = $redis->get($key); if (!empty($data)) { $data = json_decode($data, true); if ($data['is_callback'] == 1) { $redis->del($key); } else { if (time() - $data['timing'] > 300) { $companyInfo = Company::find(['id' => $data['company_id']]); Log::info($companyInfo['company_name'].'企业认证回调超时'); } } } } } }