-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
When an action is triggered on Meilisearch (update/create/delete document), on Meilisearch side a task is created and added in a queue.
To monitor this specific task using the task API the user must know the task uid.
Since we do not provide that number in the logs, the user has to look at all the tasks to find the one they try to monitor.
To avoid this unnecessary search, we should add the task number in the logs.
Example:
In this code:
firestore-meilisearch/functions/src/index.ts
Lines 68 to 73 in a732b54
if (validateDocumentId(documentId)) { | |
const document = adaptDocument(documentId, snapshot) | |
await index.addDocuments([document], { primaryKey: '_firestore_id' }) | |
} else { | |
logger.error( |
We can change the code the following way:
const { taskUid } = await index.addDocuments([document], {
primaryKey: '_firestore_id',
})
logger.info(`The task number of the document addition is: ${taskUid}`)
Not sure about the logging message, tell me if you have a better idea.
brunoocasali
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers