diff --git a/includes/FeedsSource.inc b/includes/FeedsSource.inc index e9a4b7a..84d6089 100644 --- a/includes/FeedsSource.inc +++ b/includes/FeedsSource.inc @@ -710,6 +710,7 @@ class FeedsSource extends FeedsConfigurable { ->condition('data', '%' . $serialized_job_id_as_string . '%', 'LIKE') ->condition('data', '%' . $serialized_job_id_as_integer . '%', 'LIKE') ) + ->condition('expire', 0) ->execute() ->fetchField(); @@ -727,7 +728,7 @@ class FeedsSource extends FeedsConfigurable { // records in the queue to see if the given importer ID + feed NID is // amongst them. if (Database::getConnection()->databaseType() == 'pgsql') { - $items = db_query("SELECT data, created FROM {queue} WHERE name = :name LIMIT 10", array( + $items = db_query("SELECT data, created FROM {queue} WHERE name = :name AND expired = 0 LIMIT 10", array( ':name' => 'feeds_source_import', )); foreach ($items as $item) { @@ -745,7 +746,7 @@ class FeedsSource extends FeedsConfigurable { // If not found by now, count how many items there are in the // feeds_source_import queue. We use this number later to indicate that // the job *could* be in the queue. - $number_of_queue_items = db_query('SELECT COUNT(name) FROM {queue} WHERE name = :name', array( + $number_of_queue_items = db_query('SELECT COUNT(name) FROM {queue} WHERE name = :name AND expired = 0', array( ':name' => 'feeds_source_import', ))->fetchField(); }