Closed jigarius closed 2 years ago
Some more thoughts for making this commonly-requested feature a reality:
p
.p
number of sets.drall
command for each of these sets in non-parallel mode.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.
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.
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.
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.
Requirements
--drall-processes=5
.foo &; bar &
the lines of output offoo
andbar
get mixed up.drush
command appears together and is readable.Solution
--drall-processes
, sayn
, is greater than1
, then continue, otherwise, there's nothing special to do.tmp
directory to track command progress.task
file.n
drall commands (let's call these workers) with a reference to thetask
file.drall --drall-task=/path/to/task.json ... &;
.Tasks
exec:task
.exec:drush
command.--drall-processes=n
parameter.n > 1
, then generate atask
file and launch Drall workers to execute the tasks.