This commit is contained in:
Felipe 2025-01-01 12:20:06 +00:00
parent 840c763ee4
commit b38d528656
2 changed files with 1 additions and 2 deletions

View File

@ -34,7 +34,6 @@ There are a few constants that can be edited in the `wayback_machine_downloader.
- `RETRY_DELAY` - The delay (in seconds) between retries for HTTP requests. Default is 2 seconds.
- `RATE_LIMIT` - The rate limit (in seconds) for HTTP requests. Default is 0.25 seconds.
- `CONNECTION_POOL_SIZE` - The size of the HTTP connection pool. Default is 10 connections.
- `HTTP_CACHE_SIZE` - The size of the HTTP cache. Default is 1000.
- `MEMORY_BUFFER_SIZE` - The size of the memory buffer (in bytes) for downloads. Default is 16KB.
---

View File

@ -135,7 +135,7 @@ class WaybackMachineDownloader
@exclude_filter = params[:exclude_filter]
@all = params[:all]
@maximum_pages = params[:maximum_pages] ? params[:maximum_pages].to_i : 100
@threads_count = [params[:threads_count].to_i, 1].max # Garante mínimo de 1 thread
@threads_count = [params[:threads_count].to_i, 1].max
@timeout = params[:timeout] || DEFAULT_TIMEOUT
@logger = setup_logger
@failed_downloads = Concurrent::Array.new