Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rails-api-with-engine-template
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rails-api-with-engine-template
Commits
c4b6c031
Commit
c4b6c031
authored
May 06, 2022
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新redis的配置
parent
0245aa45
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
redis.rb
src/config/redis.rb
+5
-1
No files found.
src/config/redis.rb
View file @
c4b6c031
...
...
@@ -3,6 +3,10 @@ redis_config.merge!(password: ENV["REDIS_PASSWORD"]) if ENV["REDIS_PASSWORD"].pr
redis_config
.
merge!
(
db:
ENV
[
"REDIS_DB"
])
if
ENV
[
"REDIS_DB"
].
present?
Ohm
.
redis
=
Redis
.
new
(
redis_config
)
Redis
::
Objects
.
redis
=
Redis
.
new
(
redis_config
)
# 系统中各模块需要使用的redis
$redis
=
Redis
.
new
(
redis_config
)
$token_redis
=
Redis
::
Namespace
.
new
(
:token
,
redis:
$redis
)
Redis
::
Objects
.
redis
=
Redis
.
new
(
redis_config
)
$verify_code_redis
=
Redis
::
Namespace
.
new
(
:verify_code
,
redis:
$redis
)
$limit_redis
=
Redis
::
Namespace
.
new
(
:limit
,
redis:
$redis
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment