Skip to content
Snippets Groups Projects
Commit f2ed1381 authored by Alex Barth's avatar Alex Barth
Browse files

Debugging queue compatibility.

parent 9fa49daf
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ define('FEEDS_EXPIRE_NEVER', -1); ...@@ -18,6 +18,8 @@ define('FEEDS_EXPIRE_NEVER', -1);
// An object is not persistent at all. Compare to EXPORT_IN_DATABASE OR // An object is not persistent at all. Compare to EXPORT_IN_DATABASE OR
// EXPORT_IN_CODE. // EXPORT_IN_CODE.
define('FEEDS_EXPORT_NONE', 0x0); define('FEEDS_EXPORT_NONE', 0x0);
// The Drupal Queue FeedsScheduler may use for scheduling importing or expiry.
define('FEEDS_SCHEDULER_QUEUE', 'feeds_queue');
/** /**
...@@ -38,7 +40,7 @@ function feeds_cron() { ...@@ -38,7 +40,7 @@ function feeds_cron() {
*/ */
function feeds_cron_queue_info() { function feeds_cron_queue_info() {
$queues = array(); $queues = array();
$queues['feeds_queue'] = array( $queues[FEEDS_SCHEDULER_QUEUE] = array(
'worker callback' => 'feeds_scheduler_work', 'worker callback' => 'feeds_scheduler_work',
'time' => variable_get('feeds_worker_time', 60), 'time' => variable_get('feeds_worker_time', 60),
); );
......
...@@ -111,7 +111,11 @@ class FeedsScheduler implements IFeedsScheduler { ...@@ -111,7 +111,11 @@ class FeedsScheduler implements IFeedsScheduler {
// Get feeds configuration, check whether drupal_queue is present and set // Get feeds configuration, check whether drupal_queue is present and set
// parameters accordingly. // parameters accordingly.
if ($importers = feeds_importer_load_all()) { if ($importers = feeds_importer_load_all()) {
$use_queue = module_exists('drupal_queue');
if ($use_queue = module_exists('drupal_queue')) {
drupal_queue_include();
$queue = drupal_queue_get(FEEDS_SCHEDULER_QUEUE);
}
$num = variable_get('feeds_schedule_num', $use_queue ? 200 : 5); $num = variable_get('feeds_schedule_num', $use_queue ? 200 : 5);
$num = $num ? $num : 1; $num = $num ? $num : 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment