Skip to content

Commit 2d6702d

Browse files
committed
Add username to Redis configuration
Update the Resque initializer to include the `REDIS_USERNAME` environment variable when configuring the Redis connection. This allows support for Redis instances that require username-based authentication
1 parent d2026d7 commit 2d6702d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

config/initializers/resque.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Resque.redis = Redis.new(
22
host: ENV["REDIS_HOST"],
33
port: ENV["REDIS_PORT"],
4+
username: ENV["REDIS_USERNAME"],
45
password: ENV["REDIS_PASSWORD"],
56
thread_safe: true
67
)

judge0.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ REDIS_HOST=redis
199199
# Default: 6379
200200
REDIS_PORT=
201201

202+
# Specify Redis username.
203+
# Default: empty - uses the default Redis user
204+
REDIS_USERNAME=
205+
202206
# Specify Redis password. Cannot be blank.
203207
# Default: NO DEFAULT! MUST BE SET!
204208
REDIS_PASSWORD=

0 commit comments

Comments
 (0)