openresty / openresty/lua-resty-redis
no request found
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 2k
- Forks
- 447
- Avg merge
- 2h 24m
- Merged PRs (30d)
- 3
Description
This code being executed from the context of init_by_lua_file is giving the below error:
local red = redis:new()
Looking at this - https://github.com/openresty/lua-resty-redis#limitations
It says:
This library cannot be used in code contexts like init_by_lua*, set_by_lua*,
log_by_lua*, and header_filter_by_lua* where the ngx_lua cosocket API is not available.
I want to execute a lua script when the nginx server starts. And usually that's done through init_by_lua_block/init_by_lua_file directives. How can I achieve that purpose here?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the init_by_lua_file and init_by_lua_block entry points and the lua-resty-redis limitations referenced in the issue. Determine whether the requested startup-time Redis access is supported and document a viable project-compatible approach; the issue is done when that approach is clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx, redis
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100