Merge branch 'master' into clarkeyUI

* master:
  don't pretend that imported games are being played
  don't remove unfinished imported games
This commit is contained in:
Thibault Duplessis 2014-11-27 12:00:54 +01:00
commit 9a9ede06d4
2 changed files with 2 additions and 3 deletions

View file

@ -332,7 +332,7 @@ case class Game(
0
)
def isBeingPlayed = !finishedOrAborted && !olderThan(60)
def isBeingPlayed = !isPgnImport && !finishedOrAborted && !olderThan(60)
def olderThan(seconds: Int) = updatedAt.??(_ isBefore DateTime.now.minusSeconds(seconds))

View file

@ -58,8 +58,7 @@ private[importer] case class ImportData(pgn: String) {
mode = Mode.Casual,
variant = variant,
source = Source.Import,
pgnImport = PgnImport(user = user, date = date, pgn = pgn).some
)
pgnImport = PgnImport(user = user, date = date, pgn = pgn).some).start
Preprocessed(dbGame, replay.chronoMoves, result)
}