Simplify attachment jobs SQL query

This commit is contained in:
Fedor Indutny 2021-06-01 10:13:10 -07:00 committed by GitHub
parent fcaa34d67a
commit e4d7e1e9c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -4249,7 +4249,7 @@ async function getNextAttachmentDownloadJobs(
`
SELECT json
FROM attachment_downloads
WHERE pending = 0 AND timestamp < $timestamp
WHERE pending = 0 AND timestamp <= $timestamp
ORDER BY timestamp DESC
LIMIT $limit;
`