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

Redis queue visibility #169

Open
romanoff opened this issue Jan 19, 2022 · 3 comments
Open

Redis queue visibility #169

romanoff opened this issue Jan 19, 2022 · 3 comments

Comments

@romanoff
Copy link

Is there an easy way to see what jobs are currently in the queue for Redis backend? The closest I could get to was this:

127.0.0.1:6379> XREAD COUNT 112 STREAMS "taskq:{api-worker}:stream" writers 0-0 0-0
1) 1) "taskq:{api-worker}:stream"
   2) 1) 1) "1642584445592-0"
         2) 1) "body"
            2) "\x83\xa11\xb0\xe1\r\xf4a\x1c\x05B\t\x95\xdbK\x8ex\xec\xc6X\xa13\xc4\x10\x91\xaeHello world 87\xa15\xa7counter"
      2) 1) "1642584447593-0"
         2) 1) "body"
            2) "\x83\xa11\xb0'\xad\x95\xb1c\xb5F\x92\xb4u%\xc9|\x0b\xc2N\xa13\xc4\x0f\x91\xadHello world 6\xa15\xa7counter"
      3) 1) "1642584449594-0"
         2) 1) "body"
            2) "\x83\xa11\xb0\x147\ba\x954E\xdf\x8aH8\x9ePG\xbd\xf7\xa13\xc4\x10\x91\xaeHello world 31\xa15\xa7counter"

Ideally I could start some web ui that would show it :) I could even try to build one if somebody could provide more details on how to read and de-serialize values stored in redis stream

@vmihailenco
Copy link
Owner

Redis stream stores taskq.Message that implements binary marshaler and unmarshaler - see https://github.com/vmihailenco/taskq/blob/v3/message.go#L128-L174

@lilien1010
Copy link
Collaborator

lilien1010 commented Mar 24, 2022

by default, taskq is using msgpack to marshal or unmarshal data.
you can also use msgpack https://github.com/vmihailenco/msgpack convert it back to JSON for readability.

@JamesReate
Copy link

It would be nice to have a feature to get a Task by Name for redis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants