changes
This commit is contained in:
13
app/models/jobs/fix_pixiv_uploads.rb
Normal file
13
app/models/jobs/fix_pixiv_uploads.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Jobs
|
||||
class FixPixivUploads < Struct.new(:last_post_id)
|
||||
def perform
|
||||
post_id = nil
|
||||
|
||||
Post.find_each(:conditions => ["GREATEST(width, height) IN (150, 600) AND source LIKE ? AND id > ?", "%pixiv%", last_post_id]) do |post|
|
||||
post_id = post.id
|
||||
end
|
||||
|
||||
update_attributes(:data => {:last_post_id => post_id})
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user