Skip to content

Commit

Permalink
Merge pull request #64 from lbeder/update-readme
Browse files Browse the repository at this point in the history
Update and simplify redis documentation
  • Loading branch information
lbeder committed Sep 25, 2019
2 parents 3b943e7 + 0dbabe5 commit e92c13b
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,24 @@ end
# Redis
HealthMonitor.configure do |config|
config.redis.configure do |redis_config|
redis_config.connection = Redis.current # use your custom redis connection
redis_config.url = 'redis://user:pass@example.redis.com:90210/' # or URL
redis_config.connection = Redis.current # Use your custom redis connection
redis_config.max_used_memory = 200 # Megabytes
end
end
```

Additionally, you can configure an explicit URL:

```ruby
# Redis
HealthMonitor.configure do |config|
config.redis.configure do |redis_config|
redis_config.url = 'redis://user:pass@example.redis.com:90210/'
redis_config.max_used_memory = 200
end
end
```

The currently supported settings are:

#### Sidekiq
Expand All @@ -243,9 +254,11 @@ The currently supported settings are:

#### Redis

* `url`: the URL used to connect to your Redis instance - note, this is an optional configuration and will use the default connection if not specified
* `url`: the URL used to connect to your Redis instance. Note, that this is an optional configuration and will use the default connection if not specified. You can also use `url` to explicitly configure authentication (e.g., `'redis://user:pass@example.redis.com:90210/'`).
* `connection`: Use custom Redis connection (e.g., `Redis.current`).
* `max_used_memory`: Set maximum expected memory usage of Redis in megabytes. Prevent memory leaks and keys overstore.
* `max_used_memory`: Set maximum expected memory usage of Redis in megabytes. Prevent memory leaks and keys over storing.

Please note that `url` or `connection` can't be used at the same time.

#### Delayed Job

Expand Down

0 comments on commit e92c13b

Please sign in to comment.