| Server IP : 37.9.174.138 / Your IP : 216.73.216.117 Web Server : Apache System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 User : ftpuser ( 1001) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/magento2/ |
Upload File : |
<?php
$instances = array(
"amawell.sk",
);
$consumers = array(
"product_action_attribute.update",
"product_action_attribute.website.update",
"exportProcessor",
"codegeneratorProcessor"
);
$getProcessesS = 'ps -f -u www-data 2>&1';
$processes = "";
exec('ps -f -u www-data 2>&1', $processes);
$output = "";
foreach ($instances as $instance) {
foreach ($consumers as $consumer) {
$command = "/usr/bin/php8.1 /var/www/html/" . $instance . "/web/bin/magento queue:consumers:start " . $consumer;
$runConsumer = true;
foreach ($processes as $process) {
if (strpos($process, $command) !== false) {
$runConsumer = false;
break;
}
}
$command = $command . " --max-messages=10000 > /dev/null 2>&1 &";
if ($runConsumer) {
// echo "RUN: " . $command . " \n";
exec($command, $output);
} else {
// echo "SKIP: " . $command . "\n";
}
}
}