threefoldtecharchive / jumpscaleX_archived

Apache License 2.0
1 stars 6 forks source link

maybe some issues with sonic? #729

Closed despiegk closed 5 years ago

despiegk commented 5 years ago

image

despiegk commented 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

despiegk commented 5 years ago

there are multiple things going on here but one is we need to reconnect the socket when broken because of e.g. error

despiegk commented 5 years ago

other example just do a push couple of times

image

rkhamis commented 5 years ago

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']
Pishoy commented 5 years ago

need https://github.com/threefoldtech/jumpscaleX/issues/736

Pishoy commented 5 years ago

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']