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/Daemon/Poller.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/Daemon/Poller.php')
-rw-r--r-- | Zotlabs/Daemon/Poller.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php index 77a428ec3..2103310b9 100644 --- a/Zotlabs/Daemon/Poller.php +++ b/Zotlabs/Daemon/Poller.php @@ -2,11 +2,13 @@ namespace Zotlabs\Daemon; +use Zotlabs\Lib\Config; + class Poller { static public function run($argc, $argv) { - $maxsysload = intval(get_config('system', 'maxloadavg')); + $maxsysload = intval(Config::Get('system', 'maxloadavg')); if ($maxsysload < 1) $maxsysload = 50; if (function_exists('sys_getloadavg')) { @@ -17,7 +19,7 @@ class Poller { } } - $interval = get_config('queueworker', 'queue_interval', 500000); + $interval = Config::Get('queueworker', 'queue_interval', 500000); logger('poller: start'); @@ -43,13 +45,13 @@ class Poller { reload_plugins(); // Only poll from those with suitable relationships - $abandon_days = intval(get_config('system', 'account_abandon_days', 0)); + $abandon_days = intval(Config::Get('system', 'account_abandon_days', 0)); $abandon_sql = (($abandon_days) ? sprintf(" AND account_lastlog > %s - INTERVAL %s ", db_utcnow(), db_quoteinterval(intval($abandon_days) . ' DAY')) : '' ); - $allow_feeds = get_config('system', 'feed_contacts'); + $allow_feeds = Config::Get('system', 'feed_contacts'); if(!$allow_feeds) { $sql_extra .= ' and abook_feed = 0 '; } @@ -81,7 +83,7 @@ class Poller { if (intval($contact['abook_feed'])) { $min = service_class_fetch($contact['abook_channel'], 'minimum_feedcheck_minutes'); if (!$min) - $min = intval(get_config('system', 'minimum_feedcheck_minutes')); + $min = intval(Config::Get('system', 'minimum_feedcheck_minutes')); if (!$min) $min = 60; @@ -167,7 +169,7 @@ class Poller { } } - $dirmode = intval(get_config('system', 'directory_mode')); + $dirmode = intval(Config::Get('system', 'directory_mode')); if ($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) { $r = q("SELECT * FROM updates WHERE ud_update = 1 AND (ud_last = '%s' OR ud_last > %s - INTERVAL %s)", @@ -195,7 +197,7 @@ class Poller { } } - set_config('system', 'lastpoll', datetime_convert()); + Config::Set('system', 'lastpoll', datetime_convert()); return; } |