Skip to content

Commit

Permalink
fix report fetch limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jul 18, 2017
1 parent 7741df7 commit 9207621
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conf/base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ net {
ip = "5.196.91.160"
asset {
domain = ${net.domain}
version = 1787
version = 1794
}
email = "[email protected]"
crawlable = false
Expand Down
5 changes: 3 additions & 2 deletions modules/report/src/main/ReportApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ final class ReportApi(

def unprocessedAndRecentWithFilter(nb: Int, room: Option[Room]): Fu[List[Report.WithUserAndNotes]] = for {
unprocessed <- findRecent(nb, unprocessedSelect ++ roomSelect(room))
processed <- if (room has Room.Xfiles) fuccess(Nil)
else findRecent(nb - unprocessed.size, processedSelect ++ roomSelect(room))
nbProcessed = nb - unprocessed.size
processed <- if (room.has(Room.Xfiles) || nbProcessed == 0) fuccess(Nil)
else findRecent(nbProcessed, processedSelect ++ roomSelect(room))
withNotes <- addUsersAndNotes(unprocessed ++ processed)
} yield withNotes

Expand Down

0 comments on commit 9207621

Please sign in to comment.