From 93f47042d5333198f79851f44cc0ee68f02a319f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Tue, 28 Apr 2026 10:14:28 +0800 Subject: [PATCH] feat(lua): TS task IMAGE_FORM_COMPRESS for compress upload audit Made-with: Cursor --- scripts/lib/ts_compress_audit.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/lib/ts_compress_audit.lua b/scripts/lib/ts_compress_audit.lua index c42c469..81479ab 100644 --- a/scripts/lib/ts_compress_audit.lua +++ b/scripts/lib/ts_compress_audit.lua @@ -1,4 +1,4 @@ --- 压缩直传成功后向 Rust TS(3003)登记 NOOP,便于管理端 Tasks 可追溯(非 UPLOAD_PICTURE:后者专指 combine 管线)。 +-- 压缩直传成功后向 Rust TS(3003)登记 IMAGE_FORM_COMPRESS,便于管理端 Tasks 可追溯(非 UPLOAD_PICTURE:后者专指 combine 管线)。 local cjson = require("cjson") local function create(httpc, auth_header, sudoer_token, public_url) @@ -6,9 +6,8 @@ local function create(httpc, auth_header, sudoer_token, public_url) local remote_url = "http://" .. ts_host .. "/api/v1/ts/create_task" local hty_host = ngx.req.get_headers()["HtyHost"] or "" local body_tbl = { - task_type = "NOOP", + task_type = "IMAGE_FORM_COMPRESS", payload = { - kind = "IMAGE_FORM_COMPRESS", url = public_url, }, } @@ -32,7 +31,7 @@ local function create(httpc, auth_header, sudoer_token, public_url) ngx.log(ngx.ERR, "IMAGE_FORM_COMPRESS audit: status=", res.status, " body=", res.body) return false end - ngx.log(ngx.INFO, "IMAGE_FORM_COMPRESS audit noop created") + ngx.log(ngx.INFO, "IMAGE_FORM_COMPRESS audit task created") return true end