diff --git a/drush.services.yml b/drush.services.yml new file mode 100644 index 00000000..c81c7bb5 --- /dev/null +++ b/drush.services.yml @@ -0,0 +1,5 @@ +services: + quantcdn.commands: + class: \Drupal\quant\Commands\QuantDrushCommands + tags: + - { name: drush.command } diff --git a/src/Commands/QuantDrushCommands.php b/src/Commands/QuantDrushCommands.php new file mode 100644 index 00000000..439ebeae --- /dev/null +++ b/src/Commands/QuantDrushCommands.php @@ -0,0 +1,32 @@ + 5]) { + $this->output()->writeln("Forking seed worker."); + for ($i=0; $i<$options['threads']; $i++) { + $cmd = 'drush queue:run quant_seed_worker'; + $process = proc_open($cmd, array(), $pipes, NULL, NULL, array('bypass_shell' => TRUE)); + } + } + +} +