Make code compatible with NodeJS 14

This commit is contained in:
D. Berge
2021-10-04 16:52:04 +02:00
parent 5c190e5554
commit 14541bcb95

View File

@@ -6,8 +6,8 @@ const { queue } = require('../../lib/db');
* status = status. Take oldest first.
*/
async function fetchItems ({status, limit}) {
status ||= "queued";
limit ||= 10;
status = status || "queued";
limit = limit || 10;
return await queue.get(null, {status, limit, order: "created_on", dir: "+"})
}