Adding sleep and login check when rate limit error received (#23)

This commit is contained in:
ilumos 2018-09-15 21:28:19 +01:00
parent b8401c13ea
commit 562ebf2cf4

View file

@ -110,6 +110,12 @@ class StartDownloading extends Command
$this->error('Failed to download ' . $appName . ' (App ID: ' . $item->app_id . ') for ' . $item->platform . ' from Steam account ' . $account);
$this->updateQueueItemStatus($item->id, 'failed', $message);
if(str_contains(strtolower($message), 'rate limit') ) {
$this->warn('Rate limit detected - sleeping for 1 minute');
sleep(60);
$this->checkSteamAccountsAreAuthorised();
}
}
}
}