Giter Site home page Giter Site logo

Run drush commands in parallel about drall HOT 3 CLOSED

jigarius avatar jigarius commented on June 4, 2024 1
Run drush commands in parallel

from drall.

Comments (3)

jigarius avatar jigarius commented on June 4, 2024

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

  • When a command is being executed,
    • Collect the resulting output.
    • Ensure that no other Drall sub-instance is printing output at the moment.
    • Print the collected output.
    • Preferably, this should only be used when running in parallel mode 🤔
  • When a command is issued in parallel mode,
    • Determine the number of parallel processes requested, say, p.
    • Determine the sites on which the commands have to be executed.
    • Break down the list of sites into p number of sets.
    • Issue one drall command for each of these sets in non-parallel mode.

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.

  • Option 1: Each process tracks its own progress.
  • Option 2: The main drall command (that's running in parallel mode) tracks the progress.

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

from drall.

jigarius avatar jigarius commented on June 4, 2024

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.

from drall.

jigarius avatar jigarius commented on June 4, 2024

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.

from drall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.