about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-23 21:26:08 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:15 -0500
commitd94b3b86a946944bb3d99f05f4ddb22300a5e232 (patch)
treec00511df4804cb3082b41c85440280f530aa49cc /app
parent980339b73e294e39b8fd650b5a4c25f39b31d00e (diff)
[Bug, Workaround] Handle child_url parameter being an array
Diffstat (limited to 'app')
-rw-r--r--app/workers/fetch_reply_worker.rb6
1 files changed, 5 insertions, 1 deletions
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