aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Daemon/Notifier.php23
-rw-r--r--include/network.php5
-rw-r--r--include/zot.php4
3 files changed, 18 insertions, 14 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 8ea75af61..f24eab773 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Daemon;
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\Activity;
+use Zotlabs\Lib\Queue;
require_once('include/queue_fn.php');
require_once('include/html2plain.php');
@@ -734,15 +735,17 @@ class Notifier {
}
if($packet) {
- queue_insert(array(
- 'hash' => $hash,
- 'account_id' => $channel['channel_account_id'],
- 'channel_id' => $channel['channel_id'],
- 'posturl' => $hub['hubloc_callback'],
- 'driver' => $hub['hubloc_network'],
- 'notify' => $packet,
- 'msg' => (($pmsg) ? json_encode($pmsg) : '')
- ));
+ Queue::insert(
+ [
+ 'hash' => $hash,
+ 'account_id' => $channel['channel_account_id'],
+ 'channel_id' => $channel['channel_id'],
+ 'posturl' => $hub['hubloc_callback'],
+ 'driver' => $hub['hubloc_network'],
+ 'notify' => $packet,
+ 'msg' => (($pmsg) ? json_encode($pmsg) : '')
+ ]
+ );
}
else {
$env = (($hub_env && $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']]) ? $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']] : '');
@@ -803,7 +806,7 @@ class Notifier {
}
}
- queue_insert(
+ Queue::insert(
[
'hash' => $hash,
'account_id' => $target_item['aid'],
diff --git a/include/network.php b/include/network.php
index 9d4c00ee8..bcd66cf85 100644
--- a/include/network.php
+++ b/include/network.php
@@ -2,6 +2,7 @@
use Zotlabs\Lib\Zotfinger;
use Zotlabs\Lib\Libzot;
+use Zotlabs\Lib\Queue;
/**
* @file include/network.php
@@ -1437,10 +1438,10 @@ function do_delivery($deliveries, $force = false) {
$x = q("select count(outq_hash) as total from outq where outq_delivered = 0");
- if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',300)) && (! $force)) {
+ if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',3000)) && (! $force)) {
logger('immediate delivery deferred.', LOGGER_DEBUG, LOG_INFO);
foreach($deliveries as $d) {
- update_queue_item($d);
+ Queue::update($d);
}
return;
}
diff --git a/include/zot.php b/include/zot.php
index 8a2177de7..d61873ba2 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3452,7 +3452,7 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
$x = q("select count(outq_hash) as total from outq where outq_delivered = 0");
- if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',300))) {
+ if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',3000))) {
logger('immediate delivery deferred.', LOGGER_DEBUG, LOG_INFO);
update_queue_item($hash);
continue;
@@ -4286,7 +4286,7 @@ function zot_reply_message_request($data) {
$x = q("select count(outq_hash) as total from outq where outq_delivered = 0");
- if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',300))) {
+ if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',3000))) {
logger('immediate delivery deferred.', LOGGER_DEBUG, LOG_INFO);
update_queue_item($hash);
continue;