Problem/Motivation

When debugging a queue, sometimes its difficult, especially for some transports, to inspect the overall size of a queue. Especially for non SQL-like, or if CLI tools for the transport backend in question are not available.

Determining the size of the queue is also useful for autoscaling workers. For example, https://fly.io/docs/launch/autoscale-by-metric/

And programmatically retrieving the size (as an integer) simply becomes sm messenger:stats asynchronous --format=json | jq '.transports.asynchronous.count // empty' || exit 1

Proposed resolution

Implement the stats command, as provided by Messenger component.

Add basic integration tests.

Remaining tasks

Do it.

User interface changes

Only the `sm` CLI interface.

API changes

New services

Data model changes

None

Issue fork sm-3579442

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

dpi created an issue. See original summary.

dpi’s picture

This is as green as its going to get for now.

  • dpi committed 10fd5d9d on 1.x
    feat: #3579442 Implement stats command
    
    By: dpi
    
dpi’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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