3

I am using Firebase Queue on a Heroku nodejs server to perform some rather complex tasks.

It works just fine except sometimes it throws the error:

FIREBASE WARNING: transaction at queue/tasks/L5m5MTXLPHRfmaEeCLOjjkEjUIB3 failed: disconnect

And when it disconnects the task is gone. No retries happen even though it is specified in the specs.

Code of one of the always failing tasks

var queue = new Queue(ref.child('queue'), options, function(data, progress, resolve, reject) {

    progress(50).catch(function(errorMessage) {
        reject(errorMessage);
    });

    setTimeout(function() {

        ref.child(data.level).set(null, function(error) {
            if (error) reject();
            else
                resolve();
        });

    }, 16000);
});

This is just a simple task that has to delete a node after 16 seconds.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Durian
  • 253
  • 2
  • 9

0 Answers0