mirror of
https://github.com/friendica/friendica
synced 2025-01-09 14:04:43 +00:00
Merge pull request #5481 from annando/issue-5467
Issue 5467: Fix worker and daemon
This commit is contained in:
commit
f2b97f9320
3 changed files with 5 additions and 9 deletions
|
@ -13,8 +13,7 @@ use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
// Get options
|
// Get options
|
||||||
$shortopts = '';
|
$shortopts = 'f';
|
||||||
$shortopts .= 'f';
|
|
||||||
$longopts = ['foreground'];
|
$longopts = ['foreground'];
|
||||||
$options = getopt($shortopts, $longopts);
|
$options = getopt($shortopts, $longopts);
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,7 @@ use Friendica\Core\Config;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
|
|
||||||
// Get options
|
// Get options
|
||||||
$shortopts = '';
|
$shortopts = 'sc';
|
||||||
$shortopts .= 'sc';
|
|
||||||
$longopts = ['spawn', 'cron'];
|
$longopts = ['spawn', 'cron'];
|
||||||
$options = getopt($shortopts, $longopts);
|
$options = getopt($shortopts, $longopts);
|
||||||
|
|
||||||
|
|
|
@ -1127,7 +1127,7 @@ class App
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmdline = $this->getConfigValue('config', 'php_path', 'php') . ' ' . $command;
|
$cmdline = $this->getConfigValue('config', 'php_path', 'php') . ' ' . escapeshellarg($command);
|
||||||
|
|
||||||
foreach ($args as $key => $value) {
|
foreach ($args as $key => $value) {
|
||||||
if (!is_null($value) && is_bool($value) && !$value) {
|
if (!is_null($value) && is_bool($value) && !$value) {
|
||||||
|
@ -1140,8 +1140,6 @@ class App
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmdline = escapeshellarg($cmdline);
|
|
||||||
|
|
||||||
if ($this->min_memory_reached()) {
|
if ($this->min_memory_reached()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue