From 29ef5e67855418552179bea8ff37846a44ef476d Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Tue, 29 Sep 2020 14:00:31 +0200 Subject: [PATCH] compute async only after create --- app/models/export.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/export.rb b/app/models/export.rb index c4a36ca7a..b64f35cfe 100644 --- a/app/models/export.rb +++ b/app/models/export.rb @@ -24,7 +24,7 @@ class Export < ApplicationRecord scope :stale, -> { where('updated_at < ?', (Time.zone.now - MAX_DUREE_CONSERVATION_EXPORT)) } - after_save_commit :compute_async + after_create_commit :compute_async def compute_async ExportJob.perform_later(self)