This commit is contained in:
zmagod 2017-05-08 13:03:35 +02:00
parent d6f303581f
commit e5e0a9f7f3

View file

@ -1,7 +1,7 @@
namespace :tiny_mce_asset do namespace :tiny_mce_asset do
desc 'Remove obsolete images that were created on new steps or '\ desc 'Remove obsolete images that were created on new steps or '\
'results and the step/result didn\'t get saved.' 'results and the step/result didn\'t get saved.'
task remote_obsolete_images: :environment do task remove_obsolete_images: :environment do
TinyMceAsset.where('step_id IS ? AND ' \ TinyMceAsset.where('step_id IS ? AND ' \
'result_text_id IS ? AND created_at < ?', 'result_text_id IS ? AND created_at < ?',
nil, nil, 7.days.ago) nil, nil, 7.days.ago)