Skip to content

Commit

Permalink
Small update of Govbox::ProcessUnauthorizedDeliveryNotificationJob
Browse files Browse the repository at this point in the history
  • Loading branch information
luciajanikova committed Nov 14, 2023
1 parent 73f745a commit 38eab79
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ def perform(govbox_message)

return if message.metadata["authorized"]

if Time.parse(govbox_message.delivery_notification['delivery_period_end_at']) > Time.now
Govbox::ProcessUnauthorizedDeliveryNotificationJob.set(wait_until: Time.parse(govbox_message.delivery_notification['delivery_period_end_at']))
.perform_later(govbox_message)
end_of_delivery_period = Time.parse(govbox_message.delivery_notification['delivery_period_end_at'])
if end_of_delivery_period > Time.now
Govbox::ProcessUnauthorizedDeliveryNotificationJob.set(wait_until: end_of_delivery_period).perform_later(govbox_message)
return
end

Expand Down

0 comments on commit 38eab79

Please sign in to comment.