create export after commiting the export object
This commit is contained in:
parent
a266b22399
commit
d617a4b252
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ class Export < ApplicationRecord
|
||||||
|
|
||||||
scope :stale, -> { where('updated_at < ?', (Time.zone.now - MAX_DUREE_CONSERVATION_EXPORT)) }
|
scope :stale, -> { where('updated_at < ?', (Time.zone.now - MAX_DUREE_CONSERVATION_EXPORT)) }
|
||||||
|
|
||||||
after_create :compute_async
|
after_save_commit :compute_async
|
||||||
|
|
||||||
def compute_async
|
def compute_async
|
||||||
ExportJob.perform_later(self)
|
ExportJob.perform_later(self)
|
||||||
|
|
Loading…
Reference in a new issue