Create Core\Process as a base for followup work

This commit is contained in:
Philipp Holzer 2019-08-16 11:06:37 +02:00
parent 90b438e082
commit 2c73377b39
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
4 changed files with 227 additions and 145 deletions

View file

@ -5,6 +5,7 @@
namespace Friendica\Core;
use Friendica\BaseObject;
use Friendica\Core;
use Friendica\Database\DBA;
use Friendica\Model\Process;
use Friendica\Util\DateTimeFormat;
@ -1082,7 +1083,9 @@ class Worker
$args = ['no_cron' => !$do_cron];
get_app()->proc_run($command, $args);
$a = get_app();
$process = new Core\Process($a->getLogger(), $a->getMode(), $a->getConfig(), $a->getBasePath());
$process->run($command, $args);
// after spawning we have to remove the flag.
if (Config::get('system', 'worker_daemon_mode', false)) {