aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-21 03:33:34 -0700
committerFriendika <info@friendika.com>2011-10-21 03:33:34 -0700
commit6e76c86ad20c5c9ae3f8f2e2c226c8e22b9a8032 (patch)
treebef69999ba8f63cabbeceeec052807350b24d5f7 /include/notifier.php
parentd1833cabf67b35a10a676d69a1e45fe7aadc31bc (diff)
downloadvolse-hubzilla-6e76c86ad20c5c9ae3f8f2e2c226c8e22b9a8032.tar.gz
volse-hubzilla-6e76c86ad20c5c9ae3f8f2e2c226c8e22b9a8032.tar.bz2
volse-hubzilla-6e76c86ad20c5c9ae3f8f2e2c226c8e22b9a8032.zip
queue api + queue limits
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php26
1 files changed, 4 insertions, 22 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 18ad07012..d12119b05 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -1,6 +1,7 @@
<?php
require_once("boot.php");
+require_once('include/queue_fn.php');
/*
* This file was at one time responsible for doing all deliveries, but this caused
@@ -519,13 +520,7 @@ function notifier_run($argv, $argc){
if($deliver_status == (-1)) {
logger('notifier: delivery failed: queuing message');
// queue message for redelivery
- q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`)
- VALUES ( %d, '%s', '%s', '%s') ",
- intval($contact['id']),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc($atom)
- );
+ add_to_queue($contact['id'],NETWORK_DFRN,$atom);
}
break;
case NETWORK_OSTATUS:
@@ -542,14 +537,7 @@ function notifier_run($argv, $argc){
if($deliver_status == (-1)) {
// queue message for redelivery
- q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`)
- VALUES ( %d, '%s', '%s', '%s') ",
- intval($contact['id']),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc($slap)
- );
-
+ add_to_queue($contact['id'],NETWORK_OSTATUS,$slap);
}
}
else {
@@ -564,13 +552,7 @@ function notifier_run($argv, $argc){
$deliver_status = slapper($owner,$contact['notify'],$slappy);
if($deliver_status == (-1)) {
// queue message for redelivery
- q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`)
- VALUES ( %d, '%s', '%s', '%s') ",
- intval($contact['id']),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc($slappy)
- );
+ add_to_queue($contact['id'],NETWORK_OSTATUS,$slappy);
}
}
}