diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-03-24 09:58:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-24 09:58:21 +0000 |
commit | 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 (patch) | |
tree | 4ad4413b0c00d1a478111b031d9de46218f31a89 /Zotlabs/Module/Admin/Queueworker.php | |
parent | acc1834b0dc4804703610101fa95a3375649bc45 (diff) | |
download | volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.gz volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.bz2 volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.zip |
Deprecate *_config() functions in core.
Diffstat (limited to 'Zotlabs/Module/Admin/Queueworker.php')
-rw-r--r-- | Zotlabs/Module/Admin/Queueworker.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Zotlabs/Module/Admin/Queueworker.php b/Zotlabs/Module/Admin/Queueworker.php index a4f38d07c..c98df6ac0 100644 --- a/Zotlabs/Module/Admin/Queueworker.php +++ b/Zotlabs/Module/Admin/Queueworker.php @@ -3,6 +3,7 @@ namespace Zotlabs\Module\Admin; use App; +use Zotlabs\Lib\Config; use Zotlabs\Web\Controller; class Queueworker extends Controller { @@ -17,18 +18,18 @@ class Queueworker extends Controller { $maxqueueworkers = intval($_POST['queueworker_maxworkers']); $maxqueueworkers = ($maxqueueworkers > 3) ? $maxqueueworkers : 4; - set_config('queueworker', 'max_queueworkers', $maxqueueworkers); + Config::Set('queueworker', 'max_queueworkers', $maxqueueworkers); $maxworkerage = intval($_POST['queueworker_max_age']); $maxworkerage = ($maxworkerage >= 120) ? $maxworkerage : 300; - set_config('queueworker', 'queueworker_max_age', $maxworkerage); + Config::Set('queueworker', 'queueworker_max_age', $maxworkerage); $queueworkersleep = intval($_POST['queue_worker_sleep']); $queueworkersleep = ($queueworkersleep > 100) ? $queueworkersleep : 100; - set_config('queueworker', 'queue_worker_sleep', $queueworkersleep); + Config::Set('queueworker', 'queue_worker_sleep', $queueworkersleep); $auto_queue_worker_sleep = intval($_POST['auto_queue_worker_sleep']); - set_config('queueworker', 'auto_queue_worker_sleep', $auto_queue_worker_sleep); + Config::Set('queueworker', 'auto_queue_worker_sleep', $auto_queue_worker_sleep); goaway(z_root() . '/admin/queueworker'); } @@ -54,7 +55,7 @@ class Queueworker extends Controller { } } - $maxqueueworkers = get_config('queueworker', 'max_queueworkers', 4); + $maxqueueworkers = Config::Get('queueworker', 'max_queueworkers', 4); $maxqueueworkers = ($maxqueueworkers > 3) ? $maxqueueworkers : 4; $sc = ''; @@ -68,7 +69,7 @@ class Queueworker extends Controller { ] ]); - $workermaxage = get_config('queueworker', 'queueworker_max_age'); + $workermaxage = Config::Get('queueworker', 'queueworker_max_age'); $workermaxage = ($workermaxage >= 120) ? $workermaxage : 300; $sc .= replace_macros(get_markup_template('field_input.tpl'), [ @@ -80,10 +81,10 @@ class Queueworker extends Controller { ] ]); - $queueworkersleep = get_config('queueworker', 'queue_worker_sleep'); + $queueworkersleep = Config::Get('queueworker', 'queue_worker_sleep'); $queueworkersleep = ($queueworkersleep > 100) ? $queueworkersleep : 100; - $auto_queue_worker_sleep = get_config('queueworker', 'auto_queue_worker_sleep', 0); + $auto_queue_worker_sleep = Config::Get('queueworker', 'auto_queue_worker_sleep', 0); $sc .= replace_macros(get_markup_template('field_input.tpl'), [ '$field' => [ |