Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
5e1dc840
Commit
5e1dc840
authored
Apr 06, 2020
by
nanahira
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add session redis configuration
parent
73a8b435
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app.py
app.py
+1
-0
config.example.py
config.example.py
+4
-1
No files found.
app.py
View file @
5e1dc840
...
@@ -23,6 +23,7 @@ client = MongoClient(host=config.MONGO['host'])
...
@@ -23,6 +23,7 @@ client = MongoClient(host=config.MONGO['host'])
app
.
secret_key
=
config
.
SECRET_KEY
app
.
secret_key
=
config
.
SECRET_KEY
app
.
config
[
'SESSION_TYPE'
]
=
'redis'
app
.
config
[
'SESSION_TYPE'
]
=
'redis'
app
.
config
[
'SESSION_REDIS'
]
=
config
.
SESSION_REDIS
app
.
cache
=
Cache
(
app
,
config
=
config
.
REDIS
)
app
.
cache
=
Cache
(
app
,
config
=
config
.
REDIS
)
sess
=
Session
()
sess
=
Session
()
sess
.
init_app
(
app
)
sess
.
init_app
(
app
)
...
...
config.example.py
View file @
5e1dc840
...
@@ -22,7 +22,7 @@ MONGO = {
...
@@ -22,7 +22,7 @@ MONGO = {
'database'
:
'taiko'
'database'
:
'taiko'
}
}
# Redis server settings, used for
sessions +
cache.
# Redis server settings, used for cache.
REDIS
=
{
REDIS
=
{
'CACHE_TYPE'
:
'redis'
,
'CACHE_TYPE'
:
'redis'
,
'CACHE_REDIS_HOST'
:
'127.0.0.1'
,
'CACHE_REDIS_HOST'
:
'127.0.0.1'
,
...
@@ -31,6 +31,9 @@ REDIS = {
...
@@ -31,6 +31,9 @@ REDIS = {
'CACHE_REDIS_DB'
:
None
'CACHE_REDIS_DB'
:
None
}
}
# Redis server url for session.
SESSION_REDIS
=
'redis://localhost:6379'
# Secret key used for sessions.
# Secret key used for sessions.
SECRET_KEY
=
'change-me'
SECRET_KEY
=
'change-me'
...
...
nanahira
@nanahira
mentioned in commit
53273ef0
·
Jun 09, 2020
mentioned in commit
53273ef0
mentioned in commit 53273ef0884cfac09104094875b2e8da43e95084
Toggle commit list
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