Expose payload as a views filter

Created on 6 December 2023, 12 months ago
Updated 26 February 2024, 9 months ago

Problem/Motivation

The queue listing page is a view so people can customise it, except that you cannot add a filter for the payload. This is probably because it is serialized data, but with the recent new feature of being able to retry failed jobs, it is almost impossible to find jobs to retry without being able to search by payload.

For example, we have 65000 jobs in the queue. We are completely unable to use the retry feature because there is no way to find a job to retry, so we still have to manually search in the database using a LIKE query to find a job with a particular payload (e.g. search for an order number in a recurring order).

Steps to reproduce

Edit the advancedqueue_jobs view and try to add a filter for payload.

Proposed resolution

Expose the payload field to views as a string so that it can be used with a "contains" field by anyone who wants to.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom Rob230

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Rob230
  • 🇬🇧United Kingdom Rob230

    Patch for this.

  • 🇬🇧United Kingdom Rob230
  • 🇬🇧United Kingdom ippy

    Nice one, thank you for a very simple but useful addition. I stumbled here when checking whether such a feature existed. The patch applied cleanly to * 1.0.0-rc7 (Drupal 9.5.9)

    Being able to search through thousands of payloads in order to identify and/or retry or remove the occasional job is really very helpful.

    This enables a UI approach that admins can understand and make use of, here to avoid spamming customers who did not attend an event. A (custom) cancel event occasionally fails to fire - leaving notifications remaining in the queue rather than being identified and deleted automatically. Being able to quickly identify these is great.

    Overall this seems like a useful and non-controversial addition to the project.
    +1

  • Status changed to Needs review 9 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7
    last update 9 months ago
    Composer require failure
  • 🇵🇹Portugal jcnventura

    This is not really a bug, so moving it to the correct category. Also, there is a patch proposed, so the correct status is "Needs review".

    And finally, maybe @ippy would like to change the status to "Reviewed & tested by the community", so that this actually has a chance of being committed?

Production build 0.71.5 2024