mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
Add cleanup workflow images task
SCI-5500
This commit is contained in:
parent
a89c5fef13
commit
37dad46629
1 changed files with 10 additions and 0 deletions
|
@ -151,4 +151,14 @@ namespace :data do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Purge all experiment workflow images'
|
||||||
|
task purge_experiment_workflow_images: :environment do
|
||||||
|
ActiveStorage::Attachment.where(name: 'workflowimg').delete_all
|
||||||
|
end
|
||||||
|
|
||||||
|
desc 'Purge all experiment workflow images'
|
||||||
|
task cleanup_blobs: :environment do
|
||||||
|
ActiveStorage::Blob.unattached.find_each(&:purge_later)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue