mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-04-10 05:56:42 +00:00
Ignore all HTTP errors
This commit is contained in:
parent
a71157b4d8
commit
6e6a4edd27
10
worker.go
10
worker.go
@ -42,15 +42,11 @@ func (w WorkerContext) step(results chan<- File, job Job) {
|
||||
|
||||
if httpErr, ok := err.(*HttpError); ok {
|
||||
switch httpErr.code {
|
||||
case
|
||||
fasthttp.StatusMovedPermanently,
|
||||
fasthttp.StatusFound,
|
||||
fasthttp.StatusUnauthorized,
|
||||
fasthttp.StatusForbidden,
|
||||
fasthttp.StatusNotFound:
|
||||
return
|
||||
case fasthttp.StatusTooManyRequests:
|
||||
err = ErrRateLimit
|
||||
default:
|
||||
// Don't retry HTTP error codes
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user