diff options
Diffstat (limited to 'src/daq/nginx-lua/s5-nginx-init.lua')
-rw-r--r-- | src/daq/nginx-lua/s5-nginx-init.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/daq/nginx-lua/s5-nginx-init.lua b/src/daq/nginx-lua/s5-nginx-init.lua index 9d6db84..d5bc6a7 100644 --- a/src/daq/nginx-lua/s5-nginx-init.lua +++ b/src/daq/nginx-lua/s5-nginx-init.lua @@ -33,7 +33,8 @@ -- Install this by adding the following to your nginx.conf -- -- http { --- lua_shared_dict sfive 64m; +-- lua_shared_dict sfive 64k; +-- lua_shared_dict sfive_log 64m; -- init_by_lua_file '/path/to/s5-nginx-init.lua'; -- } -- @@ -42,14 +43,13 @@ ngx.log(ngx.DEBUG, "SFive: loaded") local sfive = ngx.shared.sfive; sfive:flush_all() sfive:flush_expired() -local succ, err, forc = sfive:set("sem", 0) -if not succ then - ngx.log(ngx.ERR, "SFive: creating semaphore failed: " .. err) +local sfive_log = ngx.shared.sfive_log; +sfive_log:flush_all() +sfive_log:flush_expired() + +local ok, err, force = sfive:set("log:idx", 0) +if not ok then + ngx.log(ngx.ERR, "SFive: creating log index counter failed: " .. err) else - local succ, err, forc = sfive:set("log_idx", 0) - if not succ then - ngx.log(ngx.ERR, "SFive: creating index failed: " .. err) - else - ngx.log(ngx.INFO, "SFive: initalized successfully!") - end + ngx.log(ngx.INFO, "SFive: initialized successfully!") end |