reduce paypal requeue failsafe from 12 hours to 8 hours

This commit is contained in:
Andrew Brown 2020-02-09 13:36:50 -06:00
parent d19096fc4b
commit 6b8000c91c

View File

@ -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