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 follow to follow all tasks #581

Closed
fzyzcjy opened this issue Dec 1, 2024 · 5 comments
Closed

Allow follow to follow all tasks #581

fzyzcjy opened this issue Dec 1, 2024 · 5 comments

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Dec 1, 2024

A detailed description of the feature you would like to see added.

Hi thanks for the library! Currently pueue follow seems to only follow one task. However, it would be great to have a terminal that shows the logs of the currently running task. Now it seems I need to run pueue follow again whenever one task is finished and the next task starts.

Also, to avoid making readers confused which task it is talking about, it would be great if pueue follow prefixes the output with information of task (e.g. task id).

Explain your usecase of the requested feature

(see above)

Alternatives

No response

Additional context

No response

@Nukesor
Copy link
Owner

Nukesor commented Dec 1, 2024

I like the idea of the prefix. That definitely makes the default behavior of follow without a explicit task id a bit clearer. Reasonable QoL improvement.

Regarding the following of the next task, I'm not so sure though.
It feels like a pretty special use-case. From what I've seen most users do, the 99% usecase are long running tasks where people are interested in a single task, or multiple tasks in parallel where this behaviour wouldn't work as it requires tasks to be executed in a sequential manner.

I'm inclined to not add this, especially since this can easily be done via the shell and a small alias pfo='while pueue fo; do done'

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Dec 1, 2024

or multiple tasks in parallel where this behaviour wouldn't work

It seems this can work if we have a prefix. IIRC I have seen such UX somewhere (docker compose logs maybe?), where logs like:

[container A] this-is-a-log-line-at-time-1
[container B] this-is-another-log-line-at-time-2
[container A] this-is-yet-another-log-line-at-time-3

this can easily be done via the shell and a small alias pfo='while pueue fo; do done'

Looks reasonable!

@Nukesor
Copy link
Owner

Nukesor commented Dec 1, 2024

Could you describe your usecase a bit? I'm curious as I've always disliked the way docker compose displayed logs of multiple containers.

Personally, I found it much easier to monitor the state of a daemon with something like ctop and investigate logs of individual failed containers afterwards.

I'm getting the feeling that you would much rather like to have a proper TUI for task introspection like ctop?

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Dec 1, 2024

Hi, my personal usecase is to put it on a monitor/tab and keep an eye on it once in a while to see whether something is going wrong. I only have one or two tasks, so mixing it does not make it unreadable (but yes - if there are 10 concurrent tasks then that output can be quite bad!)

Anyway, I am happy with the while pueue fo; do done suggestion, which fulfills my primary need, and thanks for that! (Feel free to close the issue if you like - I am not sure to leave it open or not, since you mentioned the prefix thing to be implemented)

@Nukesor
Copy link
Owner

Nukesor commented Dec 1, 2024

In that case I'll close it for now :D

I'll try to figure out why I have a strong aversion against that type of logging 😅

@Nukesor Nukesor closed this as completed Dec 1, 2024
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