See drush site aliases and #628996: Concurrently execute a single drush command on multiple sites. Some of your ideas here might be helpful; I'll certainly review your code when I work on this.

Comments

fl3a’s picture

My implementation of exec is a waste product and there are imho more elegant solutions for implementing this.
But some so called "helper-fuctions" or rudiments might be useful.

#628996: Concurrently execute a single drush command on multiple sites would be awesome, do not hesitate to contact me.

greg.1.anderson’s picture

drush-3 will sequentially execute a command on multiple sites (e.g. drush @site1,@site2,@site3 update). At some point in the future we might try to make the commands execute concurrently, as described in the above-referenced issue.

roball’s picture

Title: Similar functionality coming to drush core. » Similar functionality is in drush core 3.x

Handling all sites of a multisite environment can now be done directly with drush 3.x, using

drush @sites [command]
fl3a’s picture

Yes, indeed!
Tested today with v.3.3 and it also works with v.4-dev (#831272: '@sites' alias doesn't work unless drush can find at least one local site at the drupal root).

@greg.1.anderson GREAT WORK!

Will thin out drush_multi´s code because of duplicate functionality.

fl3a’s picture

Assigned: Unassigned » fl3a
fl3a’s picture

Status: Active » Needs work

Added @depicated tag to the exec functions, added drush_log() with priority 'warning', updated the documentation and the project page.

Will remove these 2 functions soon.

fl3a’s picture

Status: Needs work » Closed (fixed)

Deleted every related function and corresponding documentation.