Skip to content

Allow real time interaction with output of executing processes#6

Open
gggeek wants to merge 2 commits into
jagandecapri:masterfrom
gggeek:allow-realtime-process-output
Open

Allow real time interaction with output of executing processes#6
gggeek wants to merge 2 commits into
jagandecapri:masterfrom
gggeek:allow-realtime-process-output

Conversation

@gggeek
Copy link
Copy Markdown

@gggeek gggeek commented Oct 22, 2016

No description provided.

@jagandecapri
Copy link
Copy Markdown
Owner

@gggeek Looks cool.
Can you write unit tests to validate it is working? You can add the tests in https://github.com/jagandecapri/symfony-parallel-process/tree/master/tests

Copy link
Copy Markdown

@gimler gimler left a comment

Choose a reason for hiding this comment

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

I need to modify the command based on the previous finished. So i would prefer to add events. Before and after.
But this would add a dependency to event-dispatcher.
@jagandecapri what do you think?

Comment thread src/ProcessManager.php Outdated
* @param Callable $callback takes 3 args: $type, $buffer, $process
*/
public function runParallel(array $processes, $maxParallel, $poll = 1000)
public function runParallel(array $processes, $maxParallel, $poll = 1000, $callback = null))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

parser error )) at the end

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hello @gimler, thanks for your work. Your goal here is to "modify the command based on the previous finished". It looks like you are trying to accomplish a sequential process execution. This simple wrapper was meant for parallel processing. Let me know if there is something that I am missing from my understanding.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actually i have 4 phantomjs instances and n testcases. Each phantom has his own port and should only execute one test a time.
So i must manipulate the command before when i know which phantom instance is free.

Actually i have three events before after and processing.

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.

3 participants