* Executes cronjobs.
*
* @author Tim Duesterhus
- * @copyright 2001-2019 WoltLab GmbH
+ * @copyright 2001-2020 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Cli\Command
*/
'width' => CLIWCF::getTerminal()->getWidth()
]));
$progress = 0;
+ $output = null;
+ if (!empty($_ENV['WORKER_STATUS_FD'])) {
+ $output = new File("php://fd/".$_ENV['WORKER_STATUS_FD'], "w");
+ }
for ($i = 0; $progress < 100; $i++) {
$worker->setLoopCount($i);
$worker->validate();
// update progress
$progress = $worker->getProgress();
$progressbar->update($progress);
+ if ($output) {
+ $output->write("$i,$progress\n");
+ }
+ }
+ if ($output) {
+ $output->write("done,$progress");
+ $output->close();
}
$progressbar->update($progress);