const task = ee.batch.Export.image.toCloudStorage({
//task description
});
task.start(() => {
console.log("Task started: " + task.id)
}, (error) => {
console.log("Error: " + error);
});
When I run the above code, the task id that is logged to the console has the form of a uuid, e.g. Task started: 45cb84eb-c9fc-4887-9016-91a4c9fdfacb
, whereas if I list the operations using ee.data.listOperations()
, the taskid is in a completely different format e.g. TLWZI4LX3SXU7LPMAVEZNMOG
.
When I use ee.data.getOperation(task.id)
, I get an error message saying that there is no task with that id, but when I pass the id listed in the ee.data.listOperations()
array, it works.
Is there any way to get the correct task id from the task object itself?