From 6b8000c91c59669d85622aa0f21b656d57b72107 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sun, 9 Feb 2020 13:36:50 -0600 Subject: [PATCH] reduce paypal requeue failsafe from 12 hours to 8 hours --- app/jobs/pay_pal_prepay_processing_job.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/jobs/pay_pal_prepay_processing_job.rb b/app/jobs/pay_pal_prepay_processing_job.rb index afe49460..3ca107af 100644 --- a/app/jobs/pay_pal_prepay_processing_job.rb +++ b/app/jobs/pay_pal_prepay_processing_job.rb @@ -7,11 +7,11 @@ class PayPalPrepayProcessingJob < ApplicationJob info = PaypalService.order_info(invoice_id) if info[:status] == 'CREATED' - # If we're still in a CREATED state, requeue once after 12 hours, just in case + # If we're still in a CREATED state, requeue once after 8 hours, just in case # Paypal's webhook didn't hit our servers. - if DateTime.current < invoice.created_at + 24.hours + if DateTime.current < invoice.created_at + 12.hours PayPalPrepayProcessingJob - .set(wait: 12.hours) + .set(wait: 8.hours) .perform_later(invoice.paypal_id) end