Commit 194b97d7 authored by Zot's avatar Zot

more queue work

parent bd5c223a
......@@ -1177,7 +1177,7 @@ function diaspora_queue_deliver(&$b) {
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
do_delivery($piled_up);
do_delivery($piled_up,true);
}
}
}
......
......@@ -443,7 +443,7 @@ function gnusoc_queue_deliver(&$a,&$b) {
else {
logger('slap_deliver: queue post returned ' . $result['return_code']
. ' from ' . $outq['outq_posturl'],LOGGER_DEBUG);
update_queue_item($outq['outq_hash']);
update_queue_item($outq['outq_hash'],10);
}
return;
......
......@@ -1017,7 +1017,7 @@ function pubcrawl_queue_deliver(&$b) {
}
}
if($piled_up) {
do_delivery($piled_up);
do_delivery($piled_up,true);
}
}
}
......
......@@ -214,11 +214,35 @@ function push_queue_deliver(&$a,&$b) {
);
remove_queue_item($outq['outq_hash']);
if(! $b['immediate']) {
$x = q("select outq_hash from outq where outq_posturl = '%s' and outq_delivered = 0",
dbesc($outq['outq_posturl'])
);
$piled_up = array();
if($x) {
foreach($x as $xx) {
$piled_up[] = $xx['outq_hash'];
}
}
if($piled_up) {
// add a pre-deliver interval, this should not be necessary
$interval = ((get_config('system','delivery_interval') !== false)
? intval(get_config('system','delivery_interval')) : 2 );
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
do_delivery($piled_up,true);
}
}
}
else {
logger('push_deliver: queue post returned ' . $result['return_code']
. ' from ' . $outq['outq_posturl'],LOGGER_DEBUG);
update_queue_item($outq['outq_hash']);
update_queue_item($outq['outq_hash'],10);
}
return;
}
......
......@@ -818,7 +818,7 @@ function statusnet_queue_deliver(&$a,&$b) {
$result = $dent->post('statuses/update', array('status' => $outq['outq_msg']));
if ($result->error) {
logger('Send to GNU social failed: "' . $result->error . '"');
update_queue_item($outq['outq_hash']);
update_queue_item($outq['outq_hash'],10);
}
else {
logger('statusnet_post send, result: ' . print_r($result, true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment