Skip to content

Commit

Permalink
fix(*) invert tcp-log and request-termination priority
Browse files Browse the repository at this point in the history
Work done in #3079 highlighted that tcp-log executed with a lower
priority than request-termination. While this functionally has not
presented a significant problem, this commit cleans up the
prioritization of these plugins to a more sane definition. This has
the added benefit of not requiring the request-termination define its
own delayed callback function once #3079 is merged.

 From #3089
  • Loading branch information
p0pr0ck5 authored and thibaultcha committed Jan 16, 2018
1 parent 72ce126 commit d41070b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kong/plugins/request-termination/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local server_header = meta._NAME .. "/" .. meta._VERSION

local RequestTerminationHandler = BasePlugin:extend()

RequestTerminationHandler.PRIORITY = 7
RequestTerminationHandler.PRIORITY = 2
RequestTerminationHandler.VERSION = "0.1.0"

function RequestTerminationHandler:new()
Expand Down
2 changes: 1 addition & 1 deletion kong/plugins/tcp-log/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local cjson = require "cjson"

local TcpLogHandler = BasePlugin:extend()

TcpLogHandler.PRIORITY = 2
TcpLogHandler.PRIORITY = 7
TcpLogHandler.VERSION = "0.1.0"

local function log(premature, conf, message)
Expand Down
4 changes: 2 additions & 2 deletions spec/01-unit/014-plugins_order_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ describe("Plugins", function()
"datadog",
"file-log",
"udp-log",
"request-termination",
"tcp-log",
"loggly",
"runscope",
"syslog",
"galileo",
"tcp-log",
"request-termination",
"correlation-id",
}

Expand Down

0 comments on commit d41070b

Please sign in to comment.