Brought back Excon for package downloading as the method recommended by async-http is unreliable, added support for importing games, repairer and updater tasks are both now simple subclasses of installer, implemented verify_files for checking installed files to prune download package list (currently causes Api.package_details to fail..., so disabled for now), misc. changes.

This commit is contained in:
2021-12-28 17:55:40 -06:00
parent f4aa666386
commit 82add3cc9d
12 changed files with 221 additions and 132 deletions

View File

@@ -11,7 +11,7 @@ class W3DHub
end
def manage_pool
while (@jobs.size.positive? || @workers.any?(&:busy?))
while @jobs.size.positive? || @workers.any?(&:busy?)
feed_pool unless @jobs.size.zero?
sleep 0.1
@@ -29,9 +29,9 @@ class W3DHub
@die = false
@job = nil
Async do
Thread.new do
until (@die)
@job.process if @job && @job.waiting?
@job.process if @job&.waiting?
@job = nil
sleep 0.1
end