kaliberjs / firebase-queue

A trimmed and more robust version of the original Firebase Queue
MIT License
20 stars 3 forks source link

_id field not available on task #8

Closed henry74 closed 6 years ago

henry74 commented 6 years ago

The original firebase-queue provided a handle to the unique task id through task._id. For your implementation, this returns 'undefined'. Is there another way to get to the original task id?

EECOLOR commented 6 years ago

Yes there is. The second argument of the processTask function contains a snapshot property which will give you access to the key. More information here: https://github.com/kaliberjs/firebase-queue/blob/master/docs/guide.md#the-processtask-function

henry74 commented 6 years ago

Thanks - I'll give it a shot

EECOLOR commented 6 years ago

The lack of the sanitize option is also mentioned here: https://github.com/kaliberjs/firebase-queue#no-more-sanitize