mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Only update one timestamp
> The order cycle itself is not changed. It's just that time passed and it's now considered open/closed.
This commit is contained in:
@@ -16,7 +16,7 @@ class OpenOrderCycleJob < ApplicationJob
|
||||
|
||||
# Mark as opened
|
||||
opened_at = Time.zone.now
|
||||
order_cycle.update_columns(opened_at:, updated_at: opened_at)
|
||||
order_cycle.update_columns(opened_at:)
|
||||
|
||||
# And notify any subscribers
|
||||
OrderCycles::WebhookService.create_webhook_job(order_cycle, 'order_cycle.opened', opened_at)
|
||||
|
||||
@@ -25,8 +25,7 @@ class OrderCycleClosingJob < ApplicationJob
|
||||
|
||||
def mark_as_processed
|
||||
OrderCycle.where(id: recently_closed_order_cycles).update_all(
|
||||
processed_at: Time.zone.now,
|
||||
updated_at: Time.zone.now
|
||||
processed_at: Time.zone.now
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user