-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Task API: TaskExecution contain a TaskResult #49665
Comments
(Experimental duplicate detection) |
I still don't see why polling is preferred over eventing especially in a system like NodeJS. Can you let me know in which case polling is preferred. |
I don't know NodeJS well enough to directly address that, so it could very well be unnecessary. My perspective is that I would expect to be able to track the life of a Task without having to subscribe to a global event and compare each ending Task with the one I'm interested in. For comparison, creating a process in Windows/Linux/MacOS returns a process ID which can be used query the state of that process, terminate it, etc. Your |
Since NodeJS is an async event based system (single threaded) polling can only be done using a setInterval which at the end results in the same as adding an event handler to the task end event. I will look into how to best allow for query (which does make sense) but not to encourage polling. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
I think it would be useful if a
TaskExecution
provided a way to get the result of the Task being executed which would include the exit code, stdout, and stderr. This would allow for things like providing a different notification when a Task completes depending on success or failure, or scanning the output and reporting back certain details.I also think it would be useful if a cached
TaskExecution
could be polled to see when it has aTaskResult
, so that if an extension kicks off a Task, it can monitor it for completion, instead of having to subscribe toonDidEndTask
when it's only concerned with a particular Task.The text was updated successfully, but these errors were encountered: