Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Queue does not throw an error if it fails to connect to the provided reference. #62

Open
@startswithaj

Description

@startswithaj

If you pass in a firebase ref that for instance doesn't have the correct read permissions when instantiating a Queue it does not throw it just logs the error? There's really no way of responding to this.

https://github.com/firebase/firebase-queue/blob/master/src/lib/queue_worker.js#L598

I can't see a way to tell programmatically if a queue worker subscription has been successfully established.

Should there be a function like Queue.shutdown such as Queue.status() that returns a promise that is resolved once all workers successful subscription to the ref has been made or rejected if it fails?

I realise the QueueWorker would have to have a status function that returns its connection state as well.

A less drastic change would be that the workers are not spawn until the ref connection is tested.

I'm happy to take a crack at a PR for this if you guys have suggestions?

A breaking change suggestion would be that Queue has a function called connect() or spawn(). That you call once you instantiate the object.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions