mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Use Enumerable#zip
ftw
This commit is contained in:
parent
1399aa3cdf
commit
6a180757f3
1 changed files with 1 additions and 2 deletions
|
@ -88,8 +88,7 @@ module Ameba
|
||||||
@formatter.started @sources
|
@formatter.started @sources
|
||||||
|
|
||||||
channels = @sources.map { Channel(Exception?).new }
|
channels = @sources.map { Channel(Exception?).new }
|
||||||
@sources.each_with_index do |source, idx|
|
@sources.zip(channels).each do |source, channel|
|
||||||
channel = channels[idx]
|
|
||||||
spawn do
|
spawn do
|
||||||
run_source(source)
|
run_source(source)
|
||||||
rescue e
|
rescue e
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue