]> git.mxchange.org Git - friendica.git/commitdiff
more work on facebook re-queue
authorFriendika <info@friendika.com>
Sun, 5 Jun 2011 09:18:18 +0000 (02:18 -0700)
committerFriendika <info@friendika.com>
Sun, 5 Jun 2011 09:18:18 +0000 (02:18 -0700)
include/queue.php

index 79f656017c3ebe564188dba0679143d4b4cc048d..cbda196dac303505ab7399d31e162c38845b4f05 100644 (file)
@@ -55,7 +55,11 @@ function queue_run($argv, $argc){
        require_once('include/salmon.php');
 
        foreach($r as $q_item) {
-               $qi = q("SELECT * FROM `queue` WHERE `id` = %d LIMIT 1",
+
+               // queue_predeliver hooks may have changed the queue db details, 
+               // so check again if this entry still needs processing
+
+               $qi = q("SELECT * FROM `queue` WHERE `id` = %d AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ",
                        intval($q_item['id'])
                );
                if(! count($qi))