Closed calendee closed 9 years ago
Can you explain how to use options that are passed to attachWorker?
options
attachWorker
I'm doing this :
var options = { maxConcurrent: 2, bufferSize: 5, minLease: '5s', maxLease: '15s' }; Firelease.attachWorker(db.child('queue'), options, function(snap) {....}); or var options = { maxConcurrent: 2, bufferSize: 5, minLease: 5000, maxLease: 15000 }; Firelease.attachWorker(db.child('queue'), options, function(snap) {....});
However, in function Queue they all end up getting converted to :
function Queue
{ maxConcurrent: 2, bufferSize: 2, minLease: 2, maxLease: 2 }
This results in multiple attempts to process the same queue item.
However, if I just use the defaults , everything works fine.
Never mind. I was the problem. I wasn't passing in options the way I described.
Can you explain how to use
options
that are passed toattachWorker
?I'm doing this :
However, in
function Queue
they all end up getting converted to :This results in multiple attempts to process the same queue item.
However, if I just use the defaults , everything works fine.