Problem/Motivation

After increasing the Maximum number of launcher threads at admin/config/system/cron/settings/launcher the Run in thread options for an individual cron job remain as -- Any --, -- Fixed -- & 1

Steps to reproduce

  • Increase Maximum number of launcher threads at admin/config/system/cron/settings/launcher
  • Check Run in thread options for an individual cron job

Proposed resolution

$max_threads = isset($this->configuration['launcher']['max_threads']) ? $this->configuration['launcher']['max_threads'] : 1;

Should be altered to use the main module configuration not the individual cron job configuration

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

intrafusion created an issue. See original summary.

intrafusion’s picture

I have made a simple issue fork which pulls max_threads out of the global config via \Drupal::config('ultimate_cron.settings')->get('launcher.max_threads');

This is a preliminary fix to make sure the correct config is being pulled through, but the final fix will probably need dependency injection

golddragon007 made their first commit to this issue’s fork.

golddragon007’s picture

I pushed here a small thread fix also, to be able to use multiple threads. Conditions:
You have to set for every cron job one by one which thread it must run.
You must use wget on the cron URL with ?thread=X where X is a positive round number, like 1,2,3,4...

DamienMcKenna’s picture

Status: Active » Needs review
keszthelyi’s picture

Patch from branch 8.x-2.x at commit 58439194

Status: Needs review » Needs work

The last submitted patch, 7: ultimate_cron-3277629-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.