Skip to content

Inspect pending commands? #3089

@assembrix-itamar-zwi

Description

@assembrix-itamar-zwi

Motivation

I am trying to debug a problem in our server where calling redisClient.close() hangs indefinitely. For that, I would like to inspect which commands are still pending, but there doesn't seem to be an API that exposes that

Basic Code Example

// Example: inspect pending commands before closing
const pending = redisClient.getPendingCommands();
console.log('Pending commands:', pending);

// Close after inspecting
await redisClient.close();

// Another example: optionally wait for pending commands to finish
await redisClient.close({ timeout: 5000, logPending: true });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions