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

feat(redis-v5): add new command to enable keyspace notifications #1650

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

coreypurcell
Copy link
Contributor

@coreypurcell coreypurcell commented Sep 29, 2020

Creates a new command for Redis.

heroku redis:keyspace-notifications HEROKU_REDIS_CPURCELL_GREEN_URL -c 'AKE' -a cp-testing

Adds another field to the info command

heroku redis:info -a cp-testing
=== redis-cpurcell-aerodynamic-53841 (HEROKU_REDIS_CPURCELL_GREEN_URL)
Plan:                   Premium 0
Status:                 available
Created:                2020-09-10 18:39
Version:                6.0.6
Timeout:                300
Maxmemory:              noeviction
Maintenance:            not required
Maintenance window:     Wednesdays 18:00 to 22:00 UTC
Persistence:            AOF
HA Status:              Available
Requires TLS:           Yes
Keyspace Notifications: AKE
=== redis-cpurcell-spherical-17414 (HEROKU_REDIS_CPURCELL_PUCE_URL)
Plan:                   Premium 0
Status:                 available
Created:                2020-09-10 18:20
Version:                6.0.6
Timeout:                300
Maxmemory:              noeviction
Maintenance:            not required
Maintenance window:     Wednesdays 18:00 to 22:00 UTC
Persistence:            AOF
HA Status:              Available
Requires TLS:           Yes
Keyspace Notifications: Disabled

Help output

set the keyspace notifications configuration

USAGE
  $ heroku redis:keyspace-notifications [DATABASE]

OPTIONS
  -a, --app=app        (required) app to run command against
  -c, --config=config  (required) set keyspace notifications configuration
  -r, --remote=remote  git remote of app to use

DESCRIPTION
  Set the configuration to enable keyspace notification events:
       K     Keyspace events, published with __keyspace@<db>__ prefix.
       E     Keyevent events, published with __keyevent@<db>__ prefix.
       g     Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
       $     String commands
       l     List commands
       s     Set commands
       h     Hash commands
       z     Sorted set commands
       t     Stream commands
       x     Expired events (events generated every time a key expires)
       e     Evicted events (events generated when a key is evicted for maxmemory)
       m     Key miss events (events generated when a key that doesn't exist is accessed)
       A     Alias for "g$lshztxe", so that the "AKE" string means all the events except "m".

       pass an empty string ('') to disable keyspace notifications

@coreypurcell coreypurcell marked this pull request as ready for review September 30, 2020 19:17
@coreypurcell coreypurcell requested a review from a team as a code owner September 30, 2020 19:17
@RasPhilCo RasPhilCo changed the title add a new command to enable keyspace notifications feat(redis-v5): add new command to enable keyspace notifications Oct 1, 2020
@RasPhilCo
Copy link
Contributor

@coreypurcell looks good! We try not to have hyphenated command names, if possible, but leveraging your experience here: is keyspace-notifications the best command name?

@coreypurcell
Copy link
Contributor Author

@RasPhilCo the actual redis key is notify-keyspace-events but the docs call it Keyspace notifications. I don't know of any other way to refer to it.

Copy link
Contributor

@RasPhilCo RasPhilCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏄

@coreypurcell coreypurcell merged commit e13c97d into master Oct 2, 2020
@coreypurcell coreypurcell deleted the add-redis-keyspace branch October 2, 2020 13:24
@coreypurcell
Copy link
Contributor Author

@RasPhilCo what needs to happen to get this shipped? We need a customer to test it out ASAP

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

Successfully merging this pull request may close these issues.

3 participants