Skip to content

Commit

Permalink
make the hour interval base on the modified column instead of the cre…
Browse files Browse the repository at this point in the history
…ated column.
  • Loading branch information
CollinBeczak committed Apr 9, 2024
1 parent d06abe3 commit afd44e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/org/maproulette/models/dal/TaskDAL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ class TaskDAL @Inject() (
s"""NOT (tasks.status != ${Task.STATUS_CREATED} AND tasks.id IN (
|SELECT task_id FROM status_actions
|WHERE osm_user_id IN (${user.osmProfile.id})
| AND created >= NOW() - '1 hour'::INTERVAL))""".stripMargin
| AND modified >= NOW() - '1 hour'::INTERVAL))""".stripMargin
)

priority match {
Expand Down Expand Up @@ -1273,7 +1273,7 @@ class TaskDAL @Inject() (
tasks.status IN (0, 3, 6) AND
NOT tasks.id IN (
SELECT task_id FROM status_actions
WHERE osm_user_id = ${user.osmProfile.id} AND created >= NOW() - '1 hour'::INTERVAL)
WHERE osm_user_id = ${user.osmProfile.id} AND modified >= NOW() - '1 hour'::INTERVAL)
ORDER BY ST_Distance(tasks.location, (SELECT location FROM tasks WHERE id = $proximityId)), tasks.status, RANDOM()
LIMIT ${this.sqlLimit(limit)}"""

Expand Down

0 comments on commit afd44e8

Please sign in to comment.