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

Parallel commands #42

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Parallel commands #42

wants to merge 10 commits into from

Conversation

marcosh
Copy link

@marcosh marcosh commented May 28, 2020

closes #41

@schell I created a first draft of the functionality, possibly to get a first feedback from you.

I wanted also to ask you the following question: currently, when I try to run commands in parallel, the whole sos process goes to background. Is this the default behaviour for concurrently? Is there an easy way to keep everything in the foreground?

@schell
Copy link
Owner

schell commented May 29, 2020

I didn't think concurrently would switch the output in the background so it's likely something else - see my PR comments inline.

src/Sos/Job.hs Outdated Show resolved Hide resolved
src/Sos/Job.hs Outdated Show resolved Hide resolved
Copy link
Owner

@schell schell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start. I'm a little wary of the command syntax though, as well as the Template type in general. Actually I think it's fine.

After you address the requested changes (using mapConcurrently and unlines) I'll check out the code and play around with it.

Thank you! Good work!

@marcosh
Copy link
Author

marcosh commented May 29, 2020

Thanks for the feedback! I fixed the things you mentioned.

Before merging I'd like to do some renaming and possibly introduce some type aliases. But before doing that I'd be happy to see the code working correctly

@marcosh
Copy link
Author

marcosh commented Jun 11, 2020

@schell sorry for bothering you, did you have the chance to play a bit with the code?

@schell
Copy link
Owner

schell commented Jun 13, 2020

Sorry @marcosh - I've been in the middle of a move.

@marcosh
Copy link
Author

marcosh commented Jun 13, 2020

don't worry, I just feared you missed my previous message. No hurry

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

Successfully merging this pull request may close these issues.

Parallel execution of commands
2 participants