compute async only after create

This commit is contained in:
simon lehericey 2020-09-29 14:00:31 +02:00
parent 5ed491b958
commit 29ef5e6785

View file

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