mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update env.example with multiprocessing switches and use them in nntmux config and Forking
This commit is contained in:
@@ -26,6 +26,12 @@ NN_SSL_VERIFY_PEER=
|
||||
NN_SSL_VERIFY_HOST=
|
||||
NN_SSL_ALLOW_SELF_SIGNED=1
|
||||
|
||||
NN_MULTIPROCESSING_MAX_CHILD_TIME=1800
|
||||
NN_MULTIPROCESSING_MAX_CHILD_WORK=1
|
||||
NN_MULTIPROCESSING_MAX_CHILDREN_OVERRIDE=0
|
||||
NN_MULTIPROCESSING_LOG_TYPE=6
|
||||
NN_MULTIPROCESSING_CHILD_OUTPUT_TYPE=1
|
||||
|
||||
ADMIN_USER=
|
||||
ADMIN_PASS=
|
||||
ADMIN_EMAIL=
|
||||
|
||||
@@ -126,26 +126,19 @@ class Forking extends \fork_daemon
|
||||
|
||||
$this->register_logging(
|
||||
[0 => $this, 1 => 'logger'],
|
||||
(\defined('NN_MULTIPROCESSING_LOG_TYPE') ? NN_MULTIPROCESSING_LOG_TYPE : \fork_daemon::LOG_LEVEL_INFO)
|
||||
config('nntmux.multiprocessing_log_type')
|
||||
);
|
||||
|
||||
if (\defined('NN_MULTIPROCESSING_MAX_CHILD_WORK')) {
|
||||
$this->max_work_per_child_set(NN_MULTIPROCESSING_MAX_CHILD_WORK);
|
||||
} else {
|
||||
$this->max_work_per_child_set(1);
|
||||
}
|
||||
$this->max_work_per_child_set(config('nntmux.multiprocessing_max_child_work'));
|
||||
|
||||
|
||||
$this->child_max_run_time_set(config('nntmux.multiprocessing_max_child_time'));
|
||||
|
||||
if (\defined('NN_MULTIPROCESSING_MAX_CHILD_TIME')) {
|
||||
$this->child_max_run_time_set(NN_MULTIPROCESSING_MAX_CHILD_TIME);
|
||||
} else {
|
||||
$this->child_max_run_time_set(1800);
|
||||
}
|
||||
|
||||
// Use a single exit method for all children, makes things easier.
|
||||
$this->register_parent_child_exit([0 => $this, 1 => 'childExit']);
|
||||
|
||||
if (\defined('NN_MULTIPROCESSING_CHILD_OUTPUT_TYPE')) {
|
||||
switch (NN_MULTIPROCESSING_CHILD_OUTPUT_TYPE) {
|
||||
switch (config('nntmux.multiprocessing_child_output_type')) {
|
||||
case 0:
|
||||
$this->outputType = self::OUTPUT_NONE;
|
||||
break;
|
||||
@@ -158,9 +151,6 @@ class Forking extends \fork_daemon
|
||||
default:
|
||||
$this->outputType = self::OUTPUT_REALTIME;
|
||||
}
|
||||
} else {
|
||||
$this->outputType = self::OUTPUT_REALTIME;
|
||||
}
|
||||
|
||||
$this->dnr_path = PHP_BINARY.' '.NN_MULTIPROCESSING.'.do_not_run/switch.php "php ';
|
||||
|
||||
@@ -1027,8 +1017,8 @@ class Forking extends \fork_daemon
|
||||
private function setMaxProcesses($maxProcesses)
|
||||
{
|
||||
// Check if override setting is on.
|
||||
if (\defined('NN_MULTIPROCESSING_MAX_CHILDREN_OVERRIDE') && NN_MULTIPROCESSING_MAX_CHILDREN_OVERRIDE > 0) {
|
||||
$maxProcesses = NN_MULTIPROCESSING_MAX_CHILDREN_OVERRIDE;
|
||||
if (config('nntmux.multiprocessing_max_children_override') > 0) {
|
||||
$maxProcesses = config('nntmux.multiprocessing_max_children_override');
|
||||
}
|
||||
|
||||
if (is_numeric($maxProcesses) && $maxProcesses > 0) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
2019-04-03 DariusIII
|
||||
* Chg: Update env.example with multiprocessing switches and use them in nntmux config and Forking
|
||||
* Chg: Remove deleting of releases by group as non-mgr mode does not exist anymore
|
||||
2019-04-02 DariusIII
|
||||
* Chg: Update symfony components to their latest versions and downgrade voku/simple_html_dom
|
||||
|
||||
@@ -17,4 +17,9 @@ return [
|
||||
'admin_username' => env('ADMIN_USER', 'admin'),
|
||||
'admin_password' => env('ADMIN_PASS', 'admin'),
|
||||
'admin_email' => env('ADMIN_EMAIL', 'admin@example.com'),
|
||||
'multiprocessing_max_child_time' => env('NN_MULTIPROCESSING_MAX_CHILD_TIME', 1800),
|
||||
'multiprocessing_max_child_work' => env('NN_MULTIPROCESSING_MAX_CHILD_WORK', 1),
|
||||
'multiprocessing_max_children_override' => env('NN_MULTIPROCESSING_MAX_CHILDREN_OVERRIDE', 0),
|
||||
'multiprocessing_log_type' => env('NN_MULTIPROCESSING_LOG_TYPE', 6),
|
||||
'multiprocessing_child_output_type' => env('NN_MULTIPROCESSING_CHILD_OUTPUT_TYPE', 1),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user