Skip to content

Commit

Permalink
Updating rake tasks to use perform_later instead of perform_now
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Jul 11, 2024
1 parent 9486862 commit ec3b735
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/tasks/iiif.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ec3b735

Please sign in to comment.