Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tzssangglass committed Oct 19, 2022
1 parent 6646125 commit d0d388d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apisix/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,17 @@ function _M.http_init_worker()
end
end

router.http_init_worker()
plugin.init_worker()
router.http_init_worker()
require("apisix.http.service").init_worker()
plugin_config.init_worker()
require("apisix.consumer").init_worker()
consumer_group.init_worker()

apisix_upstream.init_worker()
require("apisix.plugins.ext-plugin.init").init_worker()
-- TODO: need to revisit code layering and avoid similar hacking
require("apisix.plugins.ai").init_worker()

local_conf = core.config.local_conf()

Expand Down
8 changes: 7 additions & 1 deletion apisix/plugins/ai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ local _M = {
scope = "global",
}

local orig_router_match = router.router_http.match
local orig_router_match


local function match_route(ctx)
orig_router_match(ctx)
Expand Down Expand Up @@ -145,4 +146,9 @@ function _M.init()
event.register(event.CONST.BUILD_ROUTER, routes_analyze)
end


function _M.init_worker()
orig_router_match = router.router_http.match
end

return _M

0 comments on commit d0d388d

Please sign in to comment.