Problem/Motivation

I wanted to disable queue processing by setting cron time limit to 0.

Steps to reproduce

Go to /admin/config/system/queue-ui and set a queue item cron limit to 0 or empty

Proposed resolution

Found a bug and created patch

CommentFileSizeAuthor
#2 queue_ui-3318513-1.patch667 byteskevinn

Issue fork queue_ui-3318513

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:

Comments

kevinn created an issue. See original summary.

kevinn’s picture

StatusFileSize
new667 bytes

Uploaded patch.

kevinn’s picture

Version: 3.1.1 » 3.1.2
voleger’s picture

Your assumption regarding 0 is wrong. 0 sets the time limit to unlimited. See https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util...
To remove the specific queue worker from the cron execution queue, you must remove the 'cron' key from the queue order definition info.
Check hook_queue_info_alter hook API to see how to alter specific queue worker definitions.
https://api.drupal.org/api/drupal/core!core.api.php/function/hook_queue_...

voleger’s picture

Title: Setting cron time limit to empty or zero does not work » Allow to disable queue execution by cron service.
Version: 3.1.2 » 3.1.x-dev
Category: Bug report » Feature request

Here you can see that Cron checks for time value defined in cron @QueueWorker parameter.
See https://git.drupalcode.org/project/drupal/-/blame/11.x/core/lib/Drupal/C...
That means unsetting the defined QueueWorker parameter is impossible for now by using QueueUi functionality.
I am changing this issue to a Feature request.

voleger’s picture

Version: 3.1.x-dev » 3.2.x-dev
Assigned: Unassigned » voleger
Category: Feature request » Bug report
Status: Active » Needs work

An issue was detected with definition overrides, so it is actually a bug.

  • voleger committed 7ad9d1d4 on 3.2.x
    Issue #3318513 by voleger, kevinn: Allow to disable queue execution by...
voleger’s picture

Version: 3.2.x-dev » 3.1.x-dev
Status: Needs work » Patch (to be ported)

Fixed in the 3.2.x branch

  • voleger committed 02f83619 on 3.1.x
    Issue #3318513 by voleger, kevinn: Allow to disable queue execution by...
voleger’s picture

Assigned: voleger » Unassigned
Status: Patch (to be ported) » Fixed

Fixed thanks

Status: Fixed » Closed (fixed)

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