aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-09 19:57:35 -0700
committerfriendica <info@friendica.com>2015-03-09 19:57:35 -0700
commit0134a41015dd79092cb6a42ad0f7122d0af9bc6d (patch)
tree841eaab3a629984ef07fa9900303ae7c4893edae /include/notifier.php
parentef035a29bc2240ccc497d76eb6e48f2434250082 (diff)
downloadvolse-hubzilla-0134a41015dd79092cb6a42ad0f7122d0af9bc6d.tar.gz
volse-hubzilla-0134a41015dd79092cb6a42ad0f7122d0af9bc6d.tar.bz2
volse-hubzilla-0134a41015dd79092cb6a42ad0f7122d0af9bc6d.zip
more work on queue optimisations
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/notifier.php b/include/notifier.php
index a9c4905ae..bec18142a 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -135,10 +135,25 @@ function notifier_run($argv, $argc){
));
if($data) {
$result = zot_zot($hh['hubloc_callback'],$data);
-// zot_queue_item is not yet written
-// if(! $result['success'])
-// zot_queue_item();
+ // if immediate delivery failed, stick it in the queue to try again later.
+
+ if(! $result['success']) {
+ $hash = random_string();
+ q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg )
+ values ( '%s', %d, %d, '%s', '%s', %d, '%s', '%s', '%s', '%s' )",
+ dbesc($hash),
+ intval($s[0]['channel_account_id']),
+ intval($s[0]['channel_id']),
+ dbesc('zot'),
+ dbesc($hh['hubloc_callback']),
+ intval(1),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc($data),
+ dbesc('')
+ );
+ }
}
}
}