Alter the queue so that each queue item stores the scheduled time of the next delivery. This keeps the query for

queued items simple. We no longer group by posturl; as the queue update function will only keep one item per destination
scheduled for shorter term processing. Others (multiple queued items for a single destination) will be scheduled for
delivery far into the future and only delivered if the hub responds to the "active" or short term queue item.
This commit is contained in:
zotlabs
2017-01-29 14:45:25 -08:00
parent 5aa0017e91
commit d5d67708ac
6 changed files with 70 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1187 );
define( 'UPDATE_VERSION' , 1188 );
/**
*
@@ -2484,11 +2484,28 @@ function update_r1185() {
function update_r1186() {
$r1 = q("alter table profile add profile_vcard text not null default '' ");
$r1 = q("alter table profile add profile_vcard text not null");
if($r1)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
function update_r1187() {
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
$r1 = q("alter table outq add outq_scheduled timestamp not null default '0001-01-01 00:00:00' ");
}
else {
$r1 = q("alter table outq add outq_scheduled datetime not null default '0001-01-01 00:00:00' ");
}
$r2 = q("create index outq_scheduled_idx on outq (outq_scheduled)");
if($r1 && $r2)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}