destroying.rb revision 246c94208917051fd0f0d22dce3c80ef60fb94e2
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen scope :destroying, ->() { unscoped.where(is_destroying: true) }
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen scope :active, ->() { where(is_destroying: false) }
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen # Only use `destroy_asynchronously` if you want to destroy a repository.
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen # It prepares the deletion by setting a flag, which enables the deletion
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen Rails.logger.info("Destroy #{self.class} #{self} (id: #{id})")
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen I18n.t('repository.delete_error', oms: Settings.OMS.with_indefinite_article),
73b50eecfc31750a312e2f940023f522eb07178cTimo Sirainen raise Repository::DeleteError, I18n.t('repository.delete_error')
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Rails.logger.info("Mark #{self.class} #{self} (id: #{id}) as is_destroying")