jigarius / drall

A tool to run drush commands on multi-site Drupal installations.
GNU General Public License v3.0
33 stars 5 forks source link

Run drush commands in parallel #4

Closed jigarius closed 2 years ago

jigarius commented 2 years ago

Requirements

Solution

Tasks

jigarius commented 2 years ago

Some more thoughts for making this commonly-requested feature a reality:

Progress tracking

This can probably be dealt with in a separate issue where Drall shows better progress with progress bar(s). Or maybe provide reporting formats like progress, text, dots, etc.

For this issue, we just keep things simple and not think about tracking progress.

jigarius commented 2 years ago

Instead of running n drush commands with sub-lists of the sites, it seems that using a queue/workers approach will be better. I've updated the issue description to show the new proposed solution. Let's see how it goes.

jigarius commented 2 years ago

Here's a sample task file. This is generated by Drush for internal use, so the user doesn't need to worry about it.

Location: /tmp/drall/UUID.drallq.json.

{
  "version": "x.y.z",
  "status": {
    "total": 5,
    "pending": 3,
    "running": 1,
    "done": 1,
  },
  "task": {
    "command": "drush --uri=@@uri core:status --fields=site",
    "placeholder": "uri",
    "todo": {
      "ID": {
        "id": "ID",
        "status": "pending"
      }
    }
  }
}

The respective lock file would be located at: /tmp/drall/UUID.dralltask.lock. If the file exists, then a lock is in place.