Skip to content

Commit c50bd18

Browse files
committed
Forward good priority and not -priority
1 parent 9d059a4 commit c50bd18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/handlers/hydrater.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ module.exports = function(req, res, server, logger, next) {
4242

4343

4444
if(req.params.long_poll) {
45-
task.priority = -100;
45+
task.priority = 100;
4646
}
4747
else {
48-
task.priority = (req.params.priority) ? -parseInt(req.params.priority) : 0;
48+
task.priority = (req.params.priority) ? parseInt(req.params.priority) : 0;
4949
}
5050

5151
// Push it to the queue
52-
server.queue.push(task, task.priority);
52+
server.queue.push(task, -task.priority);
5353

5454
logger("Queuing: " + ((task.file_path) ? task.file_path : task.document.id));
5555
};

0 commit comments

Comments
 (0)