lib/tasks/item.rake
Block has too many lines. [83/25] Open
Open
namespace :item do
desc "This migrates things in parentheses in title to notes"
task migrate_notes: :environment do
Item.unscoped.all.find_each do |item|
if item.title =~ /\((.*)\)/
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [29/25] Open
Open
task backfill_tracks: :environment do
count = 1
Item.where.not(discogs_url: [nil, ""]).find_each do |item|
next if item.tracks.exists?
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
Open
Item.where.not(discogs_url: [nil, ""]).find_each do |item|
next if item.tracks.exists?
if (count % 25).zero?
puts "Sleeping 1 minute to wait for Discogs rate limit"
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.