Download & Extend

Don't set max_execution_time to a lower value than server setting

Project:Drupal Queue
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
fix_max_execution_time.patch529 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 8 pass(es), 0 fail(s), and 1 exception(es).View details | Re-test

Comments

#1

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.

#2

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

Updated patch fixing error in #1.

AttachmentSizeStatusTest resultOperations
1276598-fix_max_execution_time.patch534 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 8 pass(es).View details | Re-test

#3

Status:needs review» reviewed & tested by the community

Looks good to me.