From d94b3b86a946944bb3d99f05f4ddb22300a5e232 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Thu, 23 Jul 2020 21:26:08 -0500 Subject: [Bug, Workaround] Handle child_url parameter being an array --- app/workers/fetch_reply_worker.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/workers/fetch_reply_worker.rb b/app/workers/fetch_reply_worker.rb index d7d11a9d3..b93ac6c7a 100644 --- a/app/workers/fetch_reply_worker.rb +++ b/app/workers/fetch_reply_worker.rb @@ -7,6 +7,10 @@ class FetchReplyWorker sidekiq_options queue: 'pull', retry: 3 def perform(child_url) - FetchRemoteStatusService.new.call(child_url, nil) + if child_url.is_a?(String) + FetchRemoteStatusService.new.call(child_url, nil) + elsif child_url.is_a?(Enumerable) + child_url.each { |url| FetchRemoteStatusService.new.call(url, nil) } + end end end -- cgit