Closed (fixed)
Project:
Beanstalkd Integration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2012 at 12:18 UTC
Updated:
14 May 2012 at 23:00 UTC
I sometimes get this error:
Notice: Undefined variable: queue_defaults in <em class="placeholder">beanstalkd_process_item()</em> (line <em class="placeholder">122</em> of <em class="placeholder">/var/www/html/SITE/webroot/sites/all/modules/contrib/beanstalkd/runqueue.sh</em>).
Code in question:
function beanstalkd_process_item($item) {
global $queue;
$info = beanstalkd_get_host_queues(NULL, $item->name);
if (!empty($info)) {
$function = $info['worker callback'];
try {
beanstalkd_log(t("Processing job @id for queue @name", array('@id' => $item->id, '@name' => $item->name)));
if (isset($info['description callback']) && function_exists($info['description callback'])) {
beanstalkd_log($info['description callback']($item->data));
}
ini_set('display_errors', 0);
$function($item->data);
ini_set('display_errors', 1);
return TRUE;
}
catch (Exception $e) {
beanstalkd_log(t('Exception caught: @message', array('@message' => $e->getMessage())));
$stats = $queue->statsJob($item);
if ($stats['releases'] < $queue_defaults['retries']) {
$queue->release($item, $queue_defaults['priority'], $queue_defaults['release_delay']);
}
else {
$queue->bury($item);
}
return FALSE;
}
}
}
Looks like, at first glance, the defaults are not being pulled in.
Maybe we need to add this in somewhere?
$queue_defaults = beanstalkd_get_queue_options($item->name);
Comments
Comment #1
gordon commentedFixed in Dev
Comment #2
gordon commented