summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 13:33:54 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 13:33:54 +0200
commit43323b00627a90c5b6504f2f29d321bacaa7e053 (patch)
treea4a449c61bdc4deb83cc3d51d465193bc4b28d50 /lib/private
parente0514d2c042b6148f3fe1a20208d025ca0c34b20 (diff)
parent04cee6a7db2bc6cf48f6d873d92865c988539a86 (diff)
downloadnextcloud-server-43323b00627a90c5b6504f2f29d321bacaa7e053.tar.gz
nextcloud-server-43323b00627a90c5b6504f2f29d321bacaa7e053.zip
Merge pull request #24183 from owncloud/change-background-job-sort-order
Change the sort order of background jobs to be DESC instead of ASC
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/backgroundjob/joblist.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index b8230fca4de..2429b830446 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -172,8 +172,8 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->where($query->expr()->gt('id', $query->createNamedParameter($lastId, IQueryBuilder::PARAM_INT)))
- ->orderBy('id', 'ASC')
+ ->where($query->expr()->lt('id', $query->createNamedParameter($lastId, IQueryBuilder::PARAM_INT)))
+ ->orderBy('id', 'DESC')
->setMaxResults(1);
$result = $query->execute();
$row = $result->fetch();
@@ -187,7 +187,7 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->orderBy('id', 'ASC')
+ ->orderBy('id', 'DESC')
->setMaxResults(1);
$result = $query->execute();
$row = $result->fetch();