forked from e621ng/e621ng
increase random post mod queue length to 12
This commit is contained in:
parent
c36d58f5f5
commit
86af580445
@ -114,7 +114,6 @@ GEM
|
||||
coinbase (4.0.7)
|
||||
bigdecimal
|
||||
colorize (0.7.7)
|
||||
concurrent-ruby (1.0.2)
|
||||
crack (0.4.2)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.2)
|
||||
@ -217,7 +216,6 @@ GEM
|
||||
metaclass (0.0.4)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.99.3)
|
||||
mime-types-data (3.2016.0521)
|
||||
mini_portile2 (2.1.0)
|
||||
minitest (5.9.1)
|
||||
mocha (1.1.0)
|
||||
|
@ -1,6 +1,8 @@
|
||||
module Moderator
|
||||
module Post
|
||||
class QueuesController < ApplicationController
|
||||
RANDOM_COUNT = 12
|
||||
|
||||
respond_to :html, :json
|
||||
before_filter :approver_only
|
||||
|
||||
@ -22,7 +24,7 @@ module Moderator
|
||||
cookies.permanent[:moderated] = Time.now.to_i
|
||||
|
||||
::Post.without_timeout do
|
||||
@posts = ::Post.order("posts.id asc").pending_or_flagged.available_for_moderation(false).reorder("random()").limit(5)
|
||||
@posts = ::Post.order("posts.id asc").pending_or_flagged.available_for_moderation(false).reorder("random()").limit(RANDOM_COUNT)
|
||||
@posts.each # hack to force rails to eager load
|
||||
|
||||
if @posts.empty?
|
||||
|
Loading…
Reference in New Issue
Block a user