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

File watching: Doesn't re-run the task if the process never exits (e.g. server) #59

Closed
JackMordaunt opened this issue Aug 3, 2017 · 1 comment
Labels
area: watcher Changes related to the Taskfile watcher.

Comments

@JackMordaunt
Copy link
Contributor

JackMordaunt commented Aug 3, 2017

When you run task example -w for processes that complete everything is as expected: task will re-run example on file changes.

When example is starting a server (for example), something that never exits or 'completes', task will not re-run example on file changes. In other words the long running process blocks task from watching files and re-running the task.

Personally I want task to re-compile and run my server on file changes, without needed to Ctrl-C it first.

I'm not sure if the current behaviour is intentional. If I have missed something obvious please let me know.

Thoughts?

Edit: Looking through the source, it seems you could use the context (which is passed all the way to the sh interpreter) to cancel the currently executing command when a file change event comes in.

@andreynering
Copy link
Member

Thank you for the issue. Watch is a kind of experiment, it's not 100% stable.

I agree that it should stop everything, that was planned.

Closing the context should be enough. PRs are also welcome.

@andreynering andreynering added the type: bug Something not working as intended. label Aug 3, 2017
@andreynering andreynering added the area: watcher Changes related to the Taskfile watcher. label Aug 30, 2020
@pd93 pd93 removed the type: bug Something not working as intended. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: watcher Changes related to the Taskfile watcher.
Projects
None yet
Development

No branches or pull requests

3 participants