mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Make instance variable definitions more explicit
This commit is contained in:
parent
c867514f41
commit
85a9fae671
@ -138,7 +138,9 @@ class WaybackMachineDownloader
|
|||||||
end
|
end
|
||||||
|
|
||||||
threads = []
|
threads = []
|
||||||
[@threads_count, 1].max.times do
|
@processed_file_count = 0
|
||||||
|
@threads_count = 1 unless @threads_count != 0
|
||||||
|
@threads_count.times do
|
||||||
threads << Thread.new do
|
threads << Thread.new do
|
||||||
until file_queue.empty?
|
until file_queue.empty?
|
||||||
file_remote_info = file_queue.pop(true) rescue nil
|
file_remote_info = file_queue.pop(true) rescue nil
|
||||||
@ -176,10 +178,7 @@ class WaybackMachineDownloader
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def download_file file_remote_info
|
def download_file file_remote_info
|
||||||
@processed_file_count ||= 0
|
|
||||||
file_url = file_remote_info[:file_url]
|
file_url = file_remote_info[:file_url]
|
||||||
file_id = file_remote_info[:file_id]
|
file_id = file_remote_info[:file_id]
|
||||||
file_timestamp = file_remote_info[:timestamp]
|
file_timestamp = file_remote_info[:timestamp]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user