function update_queue_time($id) {
logger('queue: requeue item ' . $id);
q("UPDATE `queue` SET `last` = '%s' WHERE `id` = %d",
function update_queue_time($id) {
logger('queue: requeue item ' . $id);
q("UPDATE `queue` SET `last` = '%s' WHERE `id` = %d",
// We set "term-date" to a current date if the communication has problems.
// If the communication works again we reset this value.
// We set "term-date" to a current date if the communication has problems.
// If the communication works again we reset this value.
function add_to_queue($cid,$network,$msg,$batch = false) {
function add_to_queue($cid,$network,$msg,$batch = false) {
if ($batch && ($r[0]['total'] > $batch_queue)) {
logger('add_to_queue: too many queued items for batch server ' . $cid . ' - discarding message');
return;
if ($batch && ($r[0]['total'] > $batch_queue)) {
logger('add_to_queue: too many queued items for batch server ' . $cid . ' - discarding message');
return;