Closed Valkozaur closed 4 months ago
I thought that it might be possible to post a message on a queue once the document is processed, so we skip the polling of status.
hi @Valkozaur - if we posted a message on a queue, how would the client know that the message is there? wouldn't the client have to poll the queue?
You can implement your approach adding a "custom handler".
When importing a document, you can provide in input a list of steps
, which corresponds to the list of handlers to execute.
In the service, you can add a custom handler, used to post a message in a queue that you own, if that helps your scenario.
How to:
steps
parameter, it's a list of strings, include the name of your handler, e.g. steps: ["extract", "partition", "gen_embeddings", "save_records", "my_post_to_queue"]
Context / Scenario
Hello, thank you for supporting kernel memory, it's a powerful service.
The question is regarding running the container as a separate service.
Question
I am wondering if the GetDocumentStatusAsync is the only way to know if a document is processed?
I thought that it might be possible to post a message on a queue once the document is processed, so we skip the polling of status.
I had a look through the code but I could not find anything that suggests that.