Queue does not throw an error if it fails to connect to the provided reference. #62
Description
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