Skip to content
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

Allow custom timeouts #464

Closed
deian opened this issue Aug 9, 2022 · 1 comment
Closed

Allow custom timeouts #464

deian opened this issue Aug 9, 2022 · 1 comment

Comments

@deian
Copy link
Contributor

deian commented Aug 9, 2022

I'm using the oclif generator (it's great, thanks!), but some of my commands are timing out when using the cli-ux flush implementation:

await timeout(flush(), 10_000)

Any chance you'd be willing to take a PR with optional parameter?

ThankS!

@john-u
Copy link

john-u commented Aug 9, 2022

This is related to #453 which impacted our project as well. We have a command that opens up an SSE connection for message streaming that was all of the sudden timing out after upgrading to newer versions of @oclif/core. It seems like commands that hit this issue violate an undocumented assumption from oclif: if the Node process is still busy after Command.run() resolves, something went wrong in the framework. Any command logic should either complete synchronously or await a Promise before the end of the run context. In this case, the flush function had a bug that made it not work and a recent PR fixed this which surfaced the issue for us and others. Here is an example of how we resolved it in our command.

Would it be worth updating the docs to point this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants