shuffle queue deliveries for more randomness

This commit is contained in:
Mario
2023-06-08 15:33:02 +00:00
parent db2c5aae84
commit 0c2cb18578
2 changed files with 5 additions and 0 deletions

View File

@@ -55,6 +55,9 @@ class Queue {
foreach ($qItems as $qItem) {
$deliveries[] = $qItem['outq_hash'];
}
shuffle($deliveries);
hz_syslog(print_r($deliveries, true));
do_delivery($deliveries, true);
}
}

View File

@@ -1729,12 +1729,14 @@ function deliverable_singleton($channel_id,$xchan) {
intval($channel_id),
dbesc($xchan_hash)
);
if($r) {
if(! $r[0]['abook_instance'])
return true;
if(strpos($r[0]['abook_instance'],z_root()) !== false)
return true;
}
return false;
}