Sha256: 8a3821868c39b2895d363b7ae118792cc4ff2df28c9d91b878def0d4fe9ffa46
Contents?: true
Size: 557 Bytes
Versions: 26
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true class EmbargoExpiryJob < Hyrax::ApplicationJob def perform records_with_expired_embargos.each do |resource| Hyrax::EmbargoManager.release_embargo_for(resource: resource) && Hyrax::AccessControlList(resource).save end end ## # @return [Enumerator<Valkyrie::Resource>] ids for all the objects that have expired active embargoes def records_with_expired_embargos ids = Hyrax::EmbargoService.assets_with_expired_embargoes.map(&:id) Hyrax.query_service.find_many_by_ids(ids: ids) end end
Version data entries
26 entries across 26 versions & 1 rubygems