-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream Admin Index Endpoint output to response #562
Comments
@vikasrohit would you like to have a such a feature? |
I am good with this. There are points that come to my mind when thinking about it:
|
It feels for me, that the use who is calling the endpoint can see the output. Streaming in this terms is not different from direct returning all the errors output at one time. The only benefit of streaming here, is that we would get errors and other logs at they time they happens, so we would always know what is going on. The only thing I can think, if all the logs which now we log into console is safe to log into response. In reality it feels safe, as the admin how can call this endpoint can see logs on the sever usually. But if you want to give me more consideration before implementing, let me know, otherwise we can try to implement it in the coming release. |
Lets wait on this for now. |
We have endpoint
/v5/projects/admin/es/project/index
which we call to index multiple projects from DB to ES by defining a range of projects ids fromprojectIdStart
toprojectIdEnd
.At the moment this endpoint only responds after we prepare data for indexing and it doesn't wait until the actual indexing is finished. So we have to see the console of the server to see the logs if we want to understand when the indexing is ready and if there were any errors during indexing or no.
The can be implemented the next way:
logger
which would do 2 things:req.log
loggerend
so we can close the connection when everything is done.<log_type>: <message>
, examples:INFO: Getting user details.
ERROR: Cannot get user details.
DEBUG: User details: {"id:"11232,"name":"Test"}.
WARNING: ...
The text was updated successfully, but these errors were encountered: