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) {
$r = q("SELECT COUNT(*) AS `total` FROM `queue` INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id`
WHERE `queue`.`cid` = %d AND `contact`.`self` = 0 ",
intval($cid)
);
$r = q("SELECT COUNT(*) AS `total` FROM `queue` INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id`
WHERE `queue`.`cid` = %d AND `contact`.`self` = 0 ",
intval($cid)
);