Skip to content

Commit

Permalink
Update File Purge background task (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo committed May 17, 2023
1 parent e97cdf5 commit 63554da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/tasks/pwpush.rake
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ end
namespace :active_storage do
desc "Purges unattached Active Storage blobs. Run regularly."
task purge_unattached: :environment do
# TODO: When a worker is added, change this to purge_later
ActiveStorage::Blob.unattached.where("active_storage_blobs.created_at > ?", 2.days.ago).find_each(&:purge)
ActiveStorage::Blob.unattached.where("active_storage_blobs.created_at > ?", 2.days.ago).find_each(&:purge_later)
end
end

Expand Down

0 comments on commit 63554da

Please sign in to comment.