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(); } public function failed(Throwable $exception): void { Cache::lock('updateApps')->forceRelease(); Log::error(static::class . ' permanently failed', [ 'exception_class' => $exception::class, 'exception_message' => $exception->getMessage(), 'file' => $exception->getFile() . ':' . $exception->getLine(), ]); } }