mirror of
https://github.com/friendica/friendica
synced 2025-01-24 10:59:47 +00:00
Replace DI::config() with container
This commit is contained in:
parent
502d0d1b53
commit
81d28bbb4c
1 changed files with 7 additions and 4 deletions
11
src/App.php
11
src/App.php
|
@ -235,9 +235,12 @@ class App
|
||||||
|
|
||||||
$mode->setExecutor(Mode::DAEMON);
|
$mode->setExecutor(Mode::DAEMON);
|
||||||
|
|
||||||
DI::config()->reload();
|
/** @var IManageConfigValues */
|
||||||
|
$config = $this->container->create(IManageConfigValues::class);
|
||||||
|
|
||||||
if (empty(DI::config()->get('system', 'pidfile'))) {
|
$config->reload();
|
||||||
|
|
||||||
|
if (empty($config->get('system', 'pidfile'))) {
|
||||||
die(<<< TXT
|
die(<<< TXT
|
||||||
Please set system.pidfile in config/local.config.php. For example:
|
Please set system.pidfile in config/local.config.php. For example:
|
||||||
|
|
||||||
|
@ -248,7 +251,7 @@ class App
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pidfile = DI::config()->get('system', 'pidfile');
|
$pidfile = $config->get('system', 'pidfile');
|
||||||
|
|
||||||
if (in_array('start', $argv)) {
|
if (in_array('start', $argv)) {
|
||||||
$mode = 'start';
|
$mode = 'start';
|
||||||
|
@ -358,7 +361,7 @@ class App
|
||||||
// Just to be sure that this script really runs endlessly
|
// Just to be sure that this script really runs endlessly
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
$wait_interval = intval(DI::config()->get('system', 'cron_interval', 5)) * 60;
|
$wait_interval = intval($config->get('system', 'cron_interval', 5)) * 60;
|
||||||
|
|
||||||
$do_cron = true;
|
$do_cron = true;
|
||||||
$last_cron = 0;
|
$last_cron = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue