-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dao) do not spawn cluster when outside of ngx_lua
- Cluster is only spawned when inside if ngx_lua (when starting Kong). - Ensure LuaSocket is used by the driver by changing the return value of `ngx_stub.get_phase()` to `init`. - Ensure lua-cassandra does not output logs when in the `init` phase (which is the case because of change #2) and inside of the specs. Which is why `ngx.stub` is a new property.
- Loading branch information
1 parent
19730d7
commit 9937099
Showing
4 changed files
with
12 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
local _M = {} | ||
|
||
function _M.load(config) | ||
function _M.load(config, spawn_cluster) | ||
local DaoFactory = require("kong.dao."..config.database..".factory") | ||
return DaoFactory(config.dao_config, config.plugins_available) | ||
return DaoFactory(config.dao_config, config.plugins_available, spawn_cluster) | ||
end | ||
|
||
return _M |
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