aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue_fn.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/queue_fn.php')
-rw-r--r--include/queue_fn.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 3c1087f4e..2aca338f5 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -15,6 +15,17 @@ function remove_queue_item($id) {
);
}
+function was_recently_delayed($cid) {
+
+ $r = q("SELECT `id` FROM `queue` WHERE `cid` = %d
+ and last > UTC_TIMESTAMP() - interval 15 minute limit 1",
+ intval($cid)
+ );
+ if(count($r))
+ return true;
+ return false;
+}
+
function add_to_queue($cid,$network,$msg,$batch = false) {