compute async only after create
This commit is contained in:
parent
5ed491b958
commit
29ef5e6785
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_save_commit :compute_async
|
after_create_commit :compute_async
|
||||||
|
|
||||||
def compute_async
|
def compute_async
|
||||||
ExportJob.perform_later(self)
|
ExportJob.perform_later(self)
|
||||||
|
|
Loading…
Reference in a new issue