Websites/lib/tasks/e621.rake
2024-05-02 22:04:43 -05:00

16 lines
416 B
Ruby

# frozen_string_literal: true
namespace :e621 do
desc "Tasks related to e621"
task status_update: :environment do
E621StatusUpdater.run
end
task remove_timeouts: :environment do
E621Thumbnail.where(status: "timeout", created_at: ..10.minutes.ago).find_each do |entry|
puts "Removing timed out generation for post #{entry.post_id} (#{entry.stripped_md5}"
entry.destroy
end
end
end