mkrauser / phing-foreach-parallel-task

phing task to run sub-tasks in a foreach-loop in separate, parallel processes
2 stars 2 forks source link

Looks like it does not trigger an error in case one of the threaded processed failed #1

Open ggnet opened 7 years ago

ggnet commented 7 years ago

I have a list of servers for deployment. I want to deliver a code in parallel. That's why I've decided to change build in 'foreach' function to 'foreach_parallel'. But foreach_parallel does not make my build failed if deployment failed to one of the servers. At the same moment regular foreach works fine.

    <target name="deploy.named" depends="tgz_src">
        <echo msg="deploying ${named.servers}:"/>
        <!--<foreach_parallel list="${named.servers}" param="server" target="handle.named" threadCount="4"/>-->
        <foreach list="${named.servers}" param="server" target="handle.named"/>
    </target>
mkrauser commented 7 years ago

Sorry for the late's answer. I was pretty busy lately.

this task is in large parts based on phings native ParallelTask. And like the ParallelTask it depends on the DocBlox_Parallel_Worker class for parallel execution. This class also handles return values. So this issue would be an issue of phing itself, or DocBlox. Nevertheless, I will look into that, once I find the time. Maybe there's a workaround.