Redis
Tips & Tricks
Entering the Redis instance can be done using redis-cli
inside Vagrant or using vagrant ssh -c redis-cli
directly.
Inspecting the event streams
To list all the available event streams Tildes creates you can use the following command inside Redis:
SCAN 0 TYPE stream
That will output something like this:
1) "0"
2) 1) "event_stream:comments.update.markdown"
2) "event_stream:comment_labels.insert"
3) "event_stream:comments.insert"
4) "event_stream:topics.insert"
5) "event_stream:topics.update.link"
6) "event_stream:topics.update.markdown"
7) "event_stream:comment_labels.delete"
8) "event_stream:comments.update.is_deleted"
9) "event_stream:comments.update.is_removed"
Here each of the strings starting with event_stream:
correspond to one of the streams that the Tildes consumers create.
To actually see what these streams contain the XINFO STREAM <stream>
command can be used, for example for the event_stream:comments.insert
stream the command looks like this:
XINFO STREAM event_stream:comments.insert
Which will result in some output like this:
1) "length"
2) (integer) 1
3) "radix-tree-keys"
4) (integer) 1
5) "radix-tree-nodes"
6) (integer) 2
7) "last-generated-id"
8) "1736631555257-0"
9) "groups"
10) (integer) 3
11) "first-entry"
12) 1) "1736631555257-0"
2) 1) "comment_id"
2) "34"
13) "last-entry"
14) 1) "1736631555257-0"
2) 1) "comment_id"
2) "34"