fix sql query checking last access time

This commit is contained in:
Henry Oswald 2018-08-22 18:21:15 +01:00
parent ae84777c94
commit 40f4357cd6

View file

@ -72,7 +72,7 @@ module.exports = ProjectPersistenceManager =
job = (cb)->
keepProjectsFrom = new Date(Date.now() - ProjectPersistenceManager.EXPIRY_TIMEOUT)
q = {}
q[db.op.gt] = keepProjectsFrom
q[db.op.lt] = keepProjectsFrom
db.Project.findAll(where:{lastAccessed:q})
.then((projects) ->
cb null, projects.map((project) -> project.project_id)