-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show real redis server time by TIME command (#20)
and allow user disable TIME command by supportTimeCommand = false closes eggjs/egg#3226
- Loading branch information
Showing
10 changed files
with
87 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test/fixtures/apps/redisapp-supportTimeCommand-false/app/controller/home.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
module.exports = app => { | ||
return class HomeController extends app.Controller { | ||
* index() { | ||
const { ctx, app } = this; | ||
yield app.redis.set('foo', 'bar'); | ||
ctx.body = yield app.redis.get('foo'); | ||
} | ||
}; | ||
}; |
5 changes: 5 additions & 0 deletions
5
test/fixtures/apps/redisapp-supportTimeCommand-false/app/router.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = function(app) { | ||
app.get('/', 'home.index'); | ||
}; |
14 changes: 14 additions & 0 deletions
14
test/fixtures/apps/redisapp-supportTimeCommand-false/config/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
exports.redis = { | ||
client: { | ||
host: '127.0.0.1', | ||
port: 6379, | ||
password: '', | ||
db: '0', | ||
}, | ||
agent:true, | ||
supportTimeCommand: false, | ||
}; | ||
|
||
exports.keys = 'keys'; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/apps/redisapp-supportTimeCommand-false/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "redisapp" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters