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",
* @return bool The communication with this contact has currently problems
*/
function was_recently_delayed($cid) {
* @return bool The communication with this contact has currently problems
*/
function was_recently_delayed($cid) {
$was_delayed = false;
// Are there queue entries that were recently added?
$r = q("SELECT `id` FROM `queue` WHERE `cid` = %d
$was_delayed = false;
// Are there queue entries that were recently added?
$r = q("SELECT `id` FROM `queue` WHERE `cid` = %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)
);