X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fdaemon.php;h=490a92ab84bb160449268e64cfff792ae2b61a84;hb=14ec87e68c5a2442c02fced100ac23ebb6000bdd;hp=fcdd735668cf042550a3f598c6311419a7c70431;hpb=122ad0af14f046c2462a03fe33967dc41abfc8b5;p=friendica.git diff --git a/bin/daemon.php b/bin/daemon.php index fcdd735668..490a92ab84 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -1,7 +1,7 @@ #!/usr/bin/env php addRules(include __DIR__ . '/../static/dependencies.config $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['daemon']]); DI::init($dice); +\Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class)); $a = DI::app(); if (DI::mode()->isInstall()) { @@ -195,7 +196,7 @@ while (true) { $do_cron = true; } - if ($do_cron || (!DI::process()->isMaxLoadReached() && Worker::entriesExists() && Worker::isReady())) { + if ($do_cron || (!DI::system()->isMaxLoadReached() && Worker::entriesExists() && Worker::isReady())) { Worker::spawnWorker($do_cron); } else { Logger::info('Cool down for 5 seconds', ['pid' => $pid]);