Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with coroutines using luvit streams? #9

Open
pyrossh opened this issue Jan 18, 2017 · 4 comments
Open

Does this work with coroutines using luvit streams? #9

pyrossh opened this issue Jan 18, 2017 · 4 comments

Comments

@pyrossh
Copy link

pyrossh commented Jan 18, 2017

Like explained here https://github.com/creationix/redis-luvit#usage

Doesn't seem to work with luvit 2.0

@cyrilis
Copy link
Owner

cyrilis commented Jan 18, 2017

Hi @pyros2097 ,

Sorry, it doesn't support coroutine, currently only callback style is supported, but maybe we can work into it later.

In your reply:

Doesn't seem to work with luvit 2.0

You mean luvit-mongodb or redis-luvit ? luvi-mongodb works here.

@pyrossh
Copy link
Author

pyrossh commented Jan 18, 2017

I meant luvit-mongodb doesn't work with the latest luvit version. Here is the error I get.

web_1    | '[Info] - Create connection.......'
web_1    | HTTP server listening at http://0.0.0.0:3000/
web_1    | Uncaught Error: [string "/deps/luvit-mongodb/src/init.lua"]:282: attempt to call method 'redbg' (a nil value)
web_1    | stack traceback:
web_1    | 	[string "/deps/luvit-mongodb/src/init.lua"]:282: in function 'handler'
web_1    | 	[string "bundle:deps/core.lua"]:248: in function 'emit'
web_1    | 	[string "bundle:deps/net.lua"]:244: in function <[string "bundle:deps/net.lua"]:243>
web_1    | 	[string "bundle:deps/timer.lua"]:123: in function <[string "bundle:deps/timer.lua"]:119>
web_1    | 	[C]: in function 'run'
web_1    | 	[string "bundle:init.lua"]:52: in function <[string "bundle:init.lua"]:47>
web_1    | 	[C]: in function 'xpcall'
web_1    | 	[string "bundle:init.lua"]:47: in function 'fn'
web_1    | 	[string "bundle:deps/require.lua"]:300: in function <[string "bundle:deps/require.lua"]:265>

My Version,

luvit version: 2.9.1
luvi version: v2.6.1
rex version: 8.37 2015-04-28
libuv version: 1.8.0
ssl version: OpenSSL 1.0.2e 3 Dec 2015, lua-openssl 0.4.1

I got this error when my mongodb was offline.

It works fine when mongodb is online.
'[Info] - Database is connected.......'

Anyway I saw the source code your'e using the 'net' library whereas the redis client is using 'coro-net' library. I'll try to port if It seems worth it.

@pyrossh pyrossh closed this as completed Jan 18, 2017
@pyrossh pyrossh reopened this Jan 18, 2017
@cyrilis
Copy link
Owner

cyrilis commented Jan 18, 2017

It should not panic when mongodb offline, seems a bug. will fix it later.

I'm not quite familiar with coro-net, so I use net library instead.

@cyrilis
Copy link
Owner

cyrilis commented Jan 18, 2017

Fixed error message, published to lit, please use version @0.0.24.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants