Closed despiegk closed 5 years ago
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
'CONNECTED <sonic-server v1.2.1>'
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
'ENDED not_recognized'
not sure how to use but thought this should work
there are multiple things going on here but one is we need to reconnect the socket when broken because of e.g. error
other example just do a push couple of times
I tried with multiple pushes and queries and it works fine with me.
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['1']
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "2", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "3", text= "hello")
True
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['2', '1']
verified
JSX> j.builders.apps.sonic.install()
JSX> j.servers.sonic.get('default')
JSX> j.servers.sonic.default.start()
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['1']
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "1", text= "this is my test")
True
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['1']
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['1']
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['1']
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "2", text= "this is my test2")
True
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['2', '1']
JSX> j.servers.sonic.default.default_client.push(collection= "product", bucket= "default", object= "3", text= "hello")
2 True
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="this")
['2', '1']
JSX> j.servers.sonic.default.default_client.query(collection= "product", bucket= "default",terms="hello")
['3']
js version
3BOTDEVEL:3bot:jumpscaleX: git log -1
commit 1433d49226761d85d13c26bdc6272f18c9e4f315 (HEAD -> development_jumpscale, origin/development_jumpscale)
Author: Reem Khamis <khamisr@codescalers.com>
Date: Thu Jul 25 16:10:47 2019 +0200
hardening startupcmd kill