(09-25-2020 01:15 AM)zhihao Wrote: [ -> ]delete_one_case():
Code:
fw: file handler of one result file
newftexts: request content
insblock: content of insert block of the case in the corpus
blank_json: the value of is {"keys":[],"caseid":"___"}
delete_one_case(fw, newftexts, insblock){
caseid = get caseid from insblock
newcaseid = get caseid from newftexts
if ($caseid == $newcaseid){
write $blank_json to $fw
}
}
delete the logic, we reuse the old one deleteIfMatch
(08-11-2021 06:57 PM)lingu Wrote: [ -> ] (08-10-2021 01:58 PM)zhihao Wrote: [ -> ] (09-25-2020 01:15 AM)zhihao Wrote: [ -> ]
Code:
deleteIfMatch() {
if $reqcaseid matches $caseid
rid --insitu insert.json
((->tycajson_pfn: file of json cases
rid --insitu ((insert.json->$tycajson_pfn ))
))
RR lingu
(09-25-2020 01:15 AM)zhihao Wrote: [ -> ]
Code:
create file insert.json with request template which has empty value
create file ((insert.json->$tycajson_pfn )) with request template which has empty value
RR lingu
OK.
Quote: (09-25-2020 01:15 AM)zhihao Wrote: [ -> ]
Code:
generate result file
else
create empty result file
}
delete logic
RR lingu
without a result file, how does the client know the status of the delete op?
It won't know and the logic is not implemented in code, deleted else part
(09-25-2020 01:15 AM)zhihao Wrote: [ -> ]deleteIfMatch()
Code:
tycajson_pfn: file of json cases
deleteIfMatch() {
if $reqcaseid matches $caseid
rid --insitu $tycajson_pfn
create file $tycajson_pfn with request template which has empty value
need to remove case in sage with auntie
---
use auntie to delete case in sage
(09-25-2020 01:15 AM)zhihao Wrote: [ -> ]deleteIfMatch()
Code:
use auntie to delete case in sage
}
find little info about auntie after I search in tab, cod://sage-src/src/auntie/auntie.cpp has some infos, looks like no remove operation
Code:
void usage() {
printf (("\
Usage: auntie [--dryrun] [up | down | list | pushmove | register] [...] \n\
up starts a KissUp operation,\n which stores (uploads) the file \n\
down auntie down requests a KissDown operation,\n which provides (downloads)\n the file in the name <filename> \n\
list auntie list lists the currently stored keys in GFAT.\n These are similar to the filenames\n of files in the GFAT system \n\
pushmove auntie [--dryrun] pushmove <filename>\n <hostname> <id> <suffix>\n pushes the file to EFS of the helper_portal \n\
register auntie [--dryrun] register <filename>\n auntie register registers a task \n specification file with Sage \n\
dryrun auntie [--dryrun] \n If --dryrun is specified, auntie conducts a dryrun\n and does not really upload or download the data\n"));
}
try list some files
Code:
[sage@limbo305-1 test]$ /thinker/globe/.think/run/auntie list
[sage@limbo305-1 test]$
(08-12-2021 12:14 PM)zhihao Wrote: [ -> ] (09-25-2020 01:15 AM)zhihao Wrote: [ -> ]deleteIfMatch()
Code:
tycajson_pfn: file of json cases
deleteIfMatch() {
if $reqcaseid matches $caseid
rid --insitu $tycajson_pfn
create file $tycajson_pfn with request template which has empty value
need to remove case in sage with auntie
---
use auntie to delete case in sage
To remove the file from Sage, the program decrements casecnt, then runs 'coolauntie rm $tycano' and returns 105.
RR zhihao
(08-13-2021 07:36 PM)zhihao Wrote: [ -> ] (09-25-2020 01:15 AM)zhihao Wrote: [ -> ]deleteIfMatch()
Code:
use auntie to delete case in sage
}
find little info about auntie after I search in tab, cod://sage-src/src/auntie/auntie.cpp has some infos, looks like no remove operation
Code:
void usage() {
printf (("\
Usage: auntie [--dryrun] [up | down | list | pushmove | register] [...] \n\
up starts a KissUp operation,\n which stores (uploads) the file \n\
down auntie down requests a KissDown operation,\n which provides (downloads)\n the file in the name <filename> \n\
list auntie list lists the currently stored keys in GFAT.\n These are similar to the filenames\n of files in the GFAT system \n\
pushmove auntie [--dryrun] pushmove <filename>\n <hostname> <id> <suffix>\n pushes the file to EFS of the helper_portal \n\
register auntie [--dryrun] register <filename>\n auntie register registers a task \n specification file with Sage \n\
dryrun auntie [--dryrun] \n If --dryrun is specified, auntie conducts a dryrun\n and does not really upload or download the data\n"));
}
try list some files
Code:
[sage@limbo305-1 test]$ /thinker/globe/.think/run/auntie list
[sage@limbo305-1 test]$
If list does not work, file a bug, write a test for it, and debug to fix the problem.