From ec3b735f6c32a822df74854d127cd4e65d51298f Mon Sep 17 00:00:00 2001 From: dleadbetter Date: Thu, 11 Jul 2024 11:12:08 -0400 Subject: [PATCH] Updating rake tasks to use perform_later instead of perform_now --- lib/tasks/iiif.rake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/tasks/iiif.rake b/lib/tasks/iiif.rake index 7c52fd4..7c4cf94 100644 --- a/lib/tasks/iiif.rake +++ b/lib/tasks/iiif.rake @@ -4,7 +4,7 @@ namespace :iiif do task convert_images: :environment do Resource.all.in_batches do |resources| resources.pluck(:id).each do |resource_id| - ConvertImageJob.perform_now(resource_id) + ConvertImageJob.perform_later(resource_id) end end end @@ -22,7 +22,7 @@ namespace :iiif do query.in_batches do |resources| resources.pluck(:id).each do |resource_id| - ConvertImageJob.perform_now(resource_id) + ConvertImageJob.perform_later(resource_id) end end end @@ -31,7 +31,7 @@ namespace :iiif do task create_manifests: :environment do Resource.all.in_batches do |resources| resources.pluck(:id).each do |resource_id| - CreateManifestJob.perform_now(resource_id) + CreateManifestJob.perform_later(resource_id) end end end @@ -40,7 +40,7 @@ namespace :iiif do task create_manifests_empty: :environment do Resource.where(manifest: nil).in_batches do |resources| resources.pluck(:id).each do |resource_id| - CreateManifestJob.perform_now(resource_id) + CreateManifestJob.perform_later(resource_id) end end end @@ -49,7 +49,7 @@ namespace :iiif do task extract_exif: :environment do Resource.all.in_batches do |resources| resources.pluck(:id).each do |resource_id| - ExtractExifJob.perform_now(resource_id) + ExtractExifJob.perform_later(resource_id) end end end @@ -58,7 +58,7 @@ namespace :iiif do task extract_exif_empty: :environment do Resource.where(exif: nil).in_batches do |resources| resources.pluck(:id).each do |resource_id| - ExtractExifJob.perform_now(resource_id) + ExtractExifJob.perform_later(resource_id) end end end