rake任务的法拉第超时错误

时间:2016-08-17 09:38:12

标签: ruby-on-rails ruby

我收到的错误是:Faraday::TimeoutError: Net::ReadTimeout

继承耙任务失败:

 Event.all.each do |row|
         date = row.date.strftime('%Y-%m-%d')
         time = row.time.strftime('%H:%M:%S')
         event2 = EventTable2.find_by('product_name ILIKE ? AND delivery_time ILIKE ? AND valid_from = ?', "%#{row.eventname}%", time, date)
         if event2.blank?
           event2 = EventTable2.find_by('product_name ILIKE ? AND valid_from = ?', "%#{row.eventname}%", date)
       end
       if event2.present?
       eurl = event2.merchant_product_id
     end
     if eurl.present?
         if eurl.length > 7
           row.update(event2: eurl, eventimage: event2.merchant_image_url)
         end
      end
    end

我想知道它是因为我Event.all.each我想知道它是否花费了太长时间并且摔倒了?

任何帮助都会很棒(即使我需要重写rake任务)

由于

0 个答案:

没有答案
相关问题