Skip to content

Commit

Permalink
fix endless computation
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Sep 27, 2017
1 parent b3e86c4 commit f6e89d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/mod/src/main/Gamify.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ final class Gamify(
"month" -> -1
)).cursor[HistoryMonth]().gather[List]().flatMap { months =>
months.headOption match {
case Some(m) if m._id == lastId || !orCompute => fuccess(months)
case Some(m) if m._id == lastId => fuccess(months)
case _ if !orCompute => fuccess(months)
case Some(m) => buildHistoryAfter(m.year, m.month, until) >> history(false)
case _ => buildHistoryAfter(2012, 6, until) >> history(false)
}
Expand Down

0 comments on commit f6e89d2

Please sign in to comment.