The current logic that determines whether or not to set the max_execution to 240 only checks that the current value is less than 240.

Since 0 is less than 240, max_execution gets set. Problem is, 0 means infinite so max_execution gets set unnecessarily.

Attached patch fixes.

Comments

adamdicarlo’s picture

Status: Active » Needs work
+++ b/drupal_queue.moduleundefined
@@ -38,7 +38,8 @@ function drupal_queue_cron_run() {
+  $max_execution = ini_get('max_execution_time');
+  if ($max_execution_time > 0 && $max_execution_time < 240 && !ini_get('safe_mode')) {

Looks like a major bug in variable use:
$max_execution vs.
$max_execution_time.

joshuajabbour’s picture

Title: Don't set max_execution to a lower value » Don't set max_execution_time to a lower value than server setting
Status: Needs work » Needs review
StatusFileSize
new534 bytes

Updated patch fixing error in #1.

alexweber’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

pwolanin’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.