create export after commiting the export object

This commit is contained in:
clemkeirua 2020-09-24 17:39:16 +02:00 committed by Keirua (Rebase PR Action)
parent a266b22399
commit d617a4b252

View file

@ -24,7 +24,7 @@ class Export < ApplicationRecord
scope :stale, -> { where('updated_at < ?', (Time.zone.now - MAX_DUREE_CONSERVATION_EXPORT)) }
after_create :compute_async
after_save_commit :compute_async
def compute_async
ExportJob.perform_later(self)