File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -43,28 +43,19 @@ sodaUtil.cleanup = async function() {
43
43
44
44
let cNames = await sd . getCollectionNames ( ) ;
45
45
if ( cNames . length > 0 ) {
46
- console . log ( "existing collections: " ) ;
47
- console . log ( cNames ) ;
48
-
49
46
for ( let i = 0 ; i < cNames . length ; i ++ ) {
50
47
let coll = await sd . openCollection ( cNames [ i ] ) ;
51
- let res = await coll . drop ( ) ;
52
- if ( res . dropped ) {
53
- console . log ( "Succeed to drop collection" , cNames [ i ] ) ;
54
- } else {
55
- console . log ( "Fail to drop collection" , cNames [ i ] ) ;
56
- }
48
+ await coll . drop ( ) ;
57
49
}
58
50
}
59
-
60
51
} catch ( err ) {
61
- console . log ( 'Error in processing:\n' , err ) ;
52
+ console . error ( 'Error in processing:\n' , err ) ;
62
53
} finally {
63
54
if ( conn ) {
64
55
try {
65
56
await conn . close ( ) ;
66
57
} catch ( err ) {
67
- console . log ( 'Error in closing connection:\n' , err ) ;
58
+ console . error ( 'Error in closing connection:\n' , err ) ;
68
59
}
69
60
}
70
61
}
You can’t perform that action at this time.
0 commit comments