reorg modules
This commit is contained in:
@@ -21,10 +21,11 @@ echo $openresty_lua_scripts_dir
|
|||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp -r scripts/* $openresty_lua_scripts_dir
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|g" \
|
||||||
"$openresty_lua_scripts_dir"/*.lua
|
"$openresty_lua_scripts_dir"/*.lua \
|
||||||
|
"$openresty_lua_scripts_dir"/lib/*.lua \
|
||||||
|
|
||||||
# Reload openresty
|
# Reload openresty
|
||||||
openresty -t
|
openresty -t
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ echo $openresty_lua_scripts_dir
|
|||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp -r scripts/* $openresty_lua_scripts_dir
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|g" \
|
||||||
"$openresty_lua_scripts_dir"/*.lua
|
"$openresty_lua_scripts_dir"/*.lua \
|
||||||
|
"$openresty_lua_scripts_dir"/lib/*.lua \
|
||||||
|
|
||||||
# Reload openresty
|
# Reload openresty
|
||||||
openresty -t
|
openresty -t
|
||||||
|
|||||||
@@ -21,14 +21,15 @@ echo $openresty_lua_scripts_dir
|
|||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp -r scripts/* $openresty_lua_scripts_dir
|
||||||
# -- Copy tests
|
# -- Copy tests
|
||||||
mkdir -p $openresty_lua_scripts_dir/tests/
|
mkdir -p $openresty_lua_scripts_dir/tests/
|
||||||
cp test_scripts/*.lua $openresty_lua_scripts_dir/tests/
|
cp test_scripts/*.lua $openresty_lua_scripts_dir/tests/
|
||||||
|
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|g" \
|
||||||
"$openresty_lua_scripts_dir"/*.lua
|
"$openresty_lua_scripts_dir"/*.lua \
|
||||||
|
"$openresty_lua_scripts_dir"/lib/*.lua \
|
||||||
|
|
||||||
# Reload openresty
|
# Reload openresty
|
||||||
openresty -t
|
openresty -t
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ echo $openresty_lua_scripts_dir
|
|||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp -r scripts/* $openresty_lua_scripts_dir
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|g" \
|
||||||
"$openresty_lua_scripts_dir"/*.lua
|
"$openresty_lua_scripts_dir"/*.lua \
|
||||||
|
"$openresty_lua_scripts_dir"/lib/*.lua \
|
||||||
|
|
||||||
# Reload openresty
|
# Reload openresty
|
||||||
openresty -t
|
openresty -t
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
|
|||||||
local upload = require "resty.upload"
|
local upload = require "resty.upload"
|
||||||
local uuid = require "resty.jit-uuid"
|
local uuid = require "resty.jit-uuid"
|
||||||
local http = require "resty.http"
|
local http = require "resty.http"
|
||||||
|
local cjson = require "cjson"
|
||||||
local verify = require('lib.jwt_verify')
|
local verify = require('lib.jwt_verify')
|
||||||
local create_task = require("lib.create_task")
|
local create_task = require("lib.create_task")
|
||||||
|
local TaskTypes = require 'lib.task_type'
|
||||||
local httpc = http:new()
|
local httpc = http:new()
|
||||||
local authHeader = ngx.req.get_headers().Authorization
|
local authHeader = ngx.req.get_headers().Authorization
|
||||||
local sudoerToken = ngx.req.get_headers().HtySudoerToken
|
local sudoerToken = ngx.req.get_headers().HtySudoerToken
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
local TaskTypes = {
|
||||||
|
NOOP = 'NOOP',
|
||||||
|
UPLOAD_PICTURE = 'UPLOAD_PICTURE',
|
||||||
|
CONVERT_AUDIO_FILE = 'CONVERT_AUDIO_FILE',
|
||||||
|
AI_RATE = 'AI_RATE'
|
||||||
|
}
|
||||||
|
|
||||||
|
return TaskTypes
|
||||||
@@ -2,10 +2,7 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
|
|||||||
local cjson = require "cjson"
|
local cjson = require "cjson"
|
||||||
local http = require "resty.http"
|
local http = require "resty.http"
|
||||||
local create_task = require "lib.create_task"
|
local create_task = require "lib.create_task"
|
||||||
local TaskTypes = {
|
local TaskTypes = require 'lib.task_type'
|
||||||
NOOP = 'NOOP',
|
|
||||||
CONVERT_AUDIO_FILE = "CONVERT_AUDIO_FILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
local httpc = http.new()
|
local httpc = http.new()
|
||||||
ngx.req.read_body()
|
ngx.req.read_body()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local http = require 'resty.http'
|
|||||||
local get_wx_media = require("wx_download")
|
local get_wx_media = require("wx_download")
|
||||||
local create_task = require("lib.create_task")
|
local create_task = require("lib.create_task")
|
||||||
local verify = require('lib.jwt_verify')
|
local verify = require('lib.jwt_verify')
|
||||||
|
local TaskTypes = require 'lib.task_type'
|
||||||
local httpc = http:new()
|
local httpc = http:new()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user