(09-24-2020 01:05 PM)zhihao Wrote: [ -> ]talk2thinker.sh
Code:
work() {
read $newcasepfn till meet blank line
triage()
}
triage() informs think about the request.
Code:
$tspfn: sage tasks
triage() {
set $casecnt as the number of cases
switch $casetype {
case "insert":
insert_case()
case "delete":
delete_case()
case "query":
query_case()
case "select":
select_case()
}
set $sage_user as sage2
use program auntie to register $tspfn
}
triage and work should handle return status $? well. Otherwise the service would not work well. The return status handling has been messed up in the re-factoring. I am fixing them.
I tried select with a caseid without a match, but it still returns 200.
Code:
16:09:45 lingu@g1b-2:/thinker/globe/soft/bibo/processed> ( cat sel_no_match.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
}
16:10:08 lingu@g1b-2:/thinker/globe/soft/bibo/processed> cat sel_no_match.json
{"type":"select","query":"","caseid":"67be261c9e6311eabceb005056","insert":{}}
16:10:14 lingu@g1b-2:/thinker/globe/soft/bibo/processed>
select_case does not work.
zhihao -5s lingu -2s
Note that -5s is a serious warning and may result in salary reduction.
i've made select_case work.
zhihao - pls design and implement a test for select, and add it to test_crds
插入的返回值内不能有children,已将其删除。
目前查询功能返回404。试了第三次,可以正常查询了
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json;sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}
[zhihao@limbo30-1 processed]$
200 OK 和 404 error的返回值格式有一点问题,最后的的key后面应该没有逗号。
202009261747/zhihao: 已修复该问题
Code:
[zhihao@limbo30-1 processed]$ ( cat del_zengxingliang.json;sleep 18 ) | ncat trajan.d
-thinker.org 20050
{
"code": 404,
"msg": "not found", }
[zhihao@limbo30-1 processed]$ ( cat zengxingliang.json;sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
}
(09-26-2020 06:30 PM)zhihao Wrote: [ -> ]插入的返回值内不能有children,已将其删除。
目前查询功能返回404。试了第三次,可以正常查询了
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json;sleep 18 ) | ncat trajan.d-thinker.org 20050
dont use that any more. use 'make test'.
(09-24-2020 01:05 PM)zhihao Wrote: [ -> ]目前BIBO的运行比较复杂,要启动simpleserv和Data Thinker,并联通端口。
另外,建议请把BIBO变成一个服务,用systemctl start bibo.service启动。
首文添加BIBO backend service:
BIBO backend service为BIBO系统的后台服务。
(09-24-2020 01:05 PM)zhihao Wrote: [ -> ]BIBO系统目前部署在$bibo_base: /thinker/globe/soft/bibo
志豪 - 抱歉我错误认为bibo_base是你改了值,但其实我们原来设计的就是在/thinker/globe/soft/bibo,此处我忘记了。
现在我们将bibo_base改为/thinker/local/soft/bibo 另外bibo_share是/thinker/globe/soft/bibo 请创建一个讨论 BIBO work environment 列出这些变量。