We run sage_restart with a cron job with root on wp289-6. The cron job manifests as /etc/cron.d/cronsage owned by root with permission 644.
Code:
40 07 * * * sage source /home/sage/.bashrc && /home/sage/sage/bin/sage_restart
This is a system cron in user sage, and it seems the shell does not source .bashrc when running the job. Therefore, we need source .bashrc explicitly.
(09-24-2020 01:05 PM)zhihao Wrote: [ -> ]delete_case()
Code:
delete_case() {
clear file $tspfn
$reqcaseid = requested case id
for each case; do
set option $tycano, $reqtype and $reqcaseid for procone.py
done
auntie register tasks
generate delete success response
}
currently delete is limit to 90 cases, and it is not in D info, suggest delete it in code tree
RR lingu
Code:
function delete_case() {
flog " deleting case"
truncate -s0 $tspfn
reqcaseid=`jq '.caseid' $newcasepfn`
tonicnt=$casecnt
if (( $tonicnt > 90 )); then
tonicnt=90
fi
lingu says it will call procone.py in the process of querying cases, but there seems only sacli is called. I can't find the call.
(09-24-2020 01:05 PM)zhihao Wrote: [ -> ]query_case()
Code:
query_case() {
clear file $tspfn
for each case; do
set option $tycano for procone.py
done
auntie register tasks
generate query result response
}
i think we should move this out to another thread for clarity.
The current workflow is recorded in
http://rar.shufangkeji.com:60380/showthr...p?tid=9227
bibo generate blank json in commit 215052698dbe45a0e18a7a4ac4feac23aa21a7bf
Code:
-rw-rw-rw- 1 sage sage 156 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_126.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_127.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_128.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_129.txt.seen
-rw-rw-rw- 1 sage sage 156 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_12.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_130.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_131.txt.seen
-rw-rw-rw- 1 sage sage 156 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_132.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_133.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_134.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_135.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_136.txt.seen
-rw-rw-rw- 1 sage sage 0 Aug 12 00:52 /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_137.txt.seen
[root@wp289b-1 test]# less /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_132.txt.seen
{
"keys": [
],
"caseid": "___",
"caseyear": ,
"casetitle": "",
"casetype": "",
"caserate": "",
"caseaction": "",
"score":
}
[root@wp289b-1 test]# less /thinker/net/ynet/soft/bibo/procuratorate/cases/resprev/res_132.txt.seen
(09-24-2020 01:05 PM)zhihao Wrote: [ -> ]delete_case()
Code:
delete_case() {
clear file $tspfn
$reqcaseid = requested case id
for each case; do
set option $tycano, $reqtype and $reqcaseid for procone.py
done
auntie register tasks
generate delete success response
}
delete logic above and update to below to make it can handle more than 90 cases
Code:
newcasepfn: content of new delete request
SACLI: sacli program
bibo_helper: bibo helper node ip
$SACLI --helper $bibo_helper match $newcasepfn
RR lingu
(06-03-2021 06:33 PM)lingu Wrote: [ -> ] (05-22-2021 01:28 PM)lingu Wrote: [ -> ] (05-22-2021 11:22 AM)zhihao Wrote: [ -> ]update headopst:
BIBO use port 22,80,62818
How to make this info easy to find and use?
?
record in U info is better.