toArray(); // We onl update the apps that are actually in use by items // 1 sec delay after each update to throttle the requests foreach ($apps as $appKey => $app) { Application::getApp($app['appid']); sleep(1); } Log::debug('Update of all apps finished!'); Cache::lock('updateApps')->forceRelease(); } /** * @return void */ public function failed($exception) { Cache::lock('updateApps')->forceRelease(); } }