Sha256: f31ccca8694024ab7c6ca80abe99bc845de739b6a4d487b1e22e1d7e3e4c551e
Contents?: true
Size: 527 Bytes
Versions: 22
Compression:
Stored size: 527 Bytes
Contents
# frozen_string_literal: true class LeaseExpiryJob < Hyrax::ApplicationJob def perform records_with_expired_leases.each do |resource| Hyrax::LeaseManager.release_lease_for(resource: resource) && Hyrax::AccessControlList(resource).save end end ## # @return [Enumerator<String>] ids for all the objects that have expired active leases def records_with_expired_leases ids = Hyrax::LeaseService.assets_with_expired_leases.map(&:id) Hyrax.query_service.find_many_by_ids(ids: ids) end end
Version data entries
22 entries across 22 versions & 1 rubygems