Closed henry74 closed 9 years ago
The client that added it generates the ID, so you can always put that info in the task itself.
Assuming you're using the JavaScript SDK (the others are only syntactically different), instead of calling
tasksRef.push({
your: 'task'
});
You could:
var task = tasksRef.push(); // A client-only command
task.set({
your: 'task',
id: task.key();
});
I'd like to leverage the unique id created by Firebase when pushing a task on the queue. Is it possible to extract this from the data from the worker side or does it need to be explicitly added to the data payload?