This commit is contained in:
2023-11-06 01:42:22 +08:00
parent 4b997205c5
commit 0e00b94069
+4 -10
View File
@@ -3,16 +3,10 @@ local _M = {}
function _M.uuid()
local uuid_cmd = "/usr/bin/uuid"
local result, _, code = os.execute(uuid_cmd)
if result and code == 0 then
ngx.log(ngx.INFO, "uuid -> ", result)
return result
else
ngx.status = 500
ngx.log(ngx.ERR, "UUID GENERATION *FAILED*")
ngx.exit()
end
local handle = io.popen(uuid_cmd)
local result = handle:read("*a")
ngx.log(ngx.INFO, "uuid -> ", result)
return result
end
return _M