Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix queue details view showing stale Redis stats #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 30, 2020

  1. Fix using stale Redis stats, parse info directly

    The ioredis client used by bull makes no guarantees that the
    `serverInfo` field be updated upon issuing an INFO command, and in fact
    does not appear to do so (given bull 3.13.0 and ioredis 4.16.3).
    
    While the `serverInfo` field is indeed populated after the initial
    connection is established, it is not updated by calling INFO as assumed
    with the previous logic. This results in stale data being presented by
    Arena.
    
    Rather than relying on this undocumented and evidently fragile
    behaviour, we can instead parse the result of the INFO command on our
    own.
    
    This also happens to step around an issue with the way that ioredis
    parses key-value data in handling the INFO response, where values
    containing the colon character are incorrectly trimmed.
    
    Given the stability and superb backwards-compatibility of Redis, this
    should be a highly reliable solution.
    Rua-Yuki committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    030c6ec View commit details
    Browse the repository at this point in the history