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:
David Cook
2025-02-26 10:26:11 +11:00
committed by Maikel Linke
parent 317cbd4b32
commit 428bcc8988
2 changed files with 2 additions and 3 deletions

View File

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

View File

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