diff --git a/app/models/video_blob.rb b/app/models/video_blob.rb index 58c47aa8..9045a874 100644 --- a/app/models/video_blob.rb +++ b/app/models/video_blob.rb @@ -81,7 +81,7 @@ def episode scope :optimized, -> { where(optimized: true) } scope :uploadable, -> { where(uploadable: true) } scope :uploaded, -> { where(uploadable: false).where.not(uploaded_on: nil) } - scope :uploaded_recently, -> { where(arel_table[:uploaded_on].gteq(1.minute.ago)) } + scope :uploaded_recently, -> { where(arel_table[:uploaded_on].gteq(10.minutes.ago)) } delegate :title, :year, :episode, :season, to: :parsed, allow_nil: true, prefix: true delegate :plex_name, to: :video, prefix: true, allow_nil: true diff --git a/spec/models/video_blob_spec.rb b/spec/models/video_blob_spec.rb index 53ca29f7..7b302c80 100644 --- a/spec/models/video_blob_spec.rb +++ b/spec/models/video_blob_spec.rb @@ -46,7 +46,7 @@ it { is_expected.to have_scope(:uploadable).where(uploadable: true) } it { - expect(subject).to have_scope(:uploaded_recently).where(described_class.arel_table[:uploaded_on].gteq(1.minute.ago)) + expect(subject).to have_scope(:uploaded_recently).where(described_class.arel_table[:uploaded_on].gteq(10.minutes.ago)) } end