add log
This commit is contained in:
+9
-3
@@ -4,6 +4,8 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
|
|||||||
|
|
||||||
local uuid = require "resty.jit-uuid"
|
local uuid = require "resty.jit-uuid"
|
||||||
local cjson = require "cjson"
|
local cjson = require "cjson"
|
||||||
|
local pl = require "pl.pretty"
|
||||||
|
|
||||||
uuid.seed()
|
uuid.seed()
|
||||||
|
|
||||||
local file_dir = ngx.var.tmp_file_dir
|
local file_dir = ngx.var.tmp_file_dir
|
||||||
@@ -35,10 +37,14 @@ end
|
|||||||
|
|
||||||
for i = 1, len do
|
for i = 1, len do
|
||||||
ngx.log(ngx.INFO, "COMBINE FILE -> ", data[i])
|
ngx.log(ngx.INFO, "COMBINE FILE -> ", data[i])
|
||||||
local cmd = convert .. " -resize 1280x " .. data[i] .. " " .. file_dir .. "/" .. data[i] .. ".png"
|
|
||||||
io.popen(cmd)
|
|
||||||
ngx.log(ngx.INFO, 'CMD RESIZE -> ', cmd)
|
|
||||||
origin[i] = file_dir .. "/" .. data[i] .. ".png "
|
origin[i] = file_dir .. "/" .. data[i] .. ".png "
|
||||||
|
local cmd = convert .. " -resize 1280x " .. data[i] .. " " .. origin[i]
|
||||||
|
ngx.log(ngx.INFO, 'CMD RESIZE -> ', cmd)
|
||||||
|
local handle = io.popen(cmd)
|
||||||
|
local result = handle:read("*a")
|
||||||
|
ngx.log(ngx.INFO, 'CMD RESIZE -> RESULT ', pl.dump(result))
|
||||||
|
handle:close()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local cmd = convert .. " -append " .. table.concat(origin, " ") .. " " .. combined
|
local cmd = convert .. " -append " .. table.concat(origin, " ") .. " " .. combined
|
||||||
|
|||||||
Reference in New Issue
Block a user