diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-23 21:26:08 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:15 -0500 |
commit | d94b3b86a946944bb3d99f05f4ddb22300a5e232 (patch) | |
tree | c00511df4804cb3082b41c85440280f530aa49cc /app | |
parent | 980339b73e294e39b8fd650b5a4c25f39b31d00e (diff) |
[Bug, Workaround] Handle child_url parameter being an array
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/fetch_reply_worker.rb | 6 |
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 |