File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,28 @@ async function asyncForEach(array, callback) {
111
111
console . log ( missions ) ;
112
112
113
113
await col . updateOne ( { ship_id : name } , { $set : { missions } } ) ;
114
+
115
+ if ( name === 'MRSTEVEN' ) {
116
+ console . log ( 'Mr Steven' ) ;
117
+ const attempted_catches = await launches . countDocuments ( {
118
+ upcoming : false ,
119
+ launch_success : true ,
120
+ 'rocket.fairings.ship' : 'MR STEVEN' ,
121
+ 'rocket.fairings.recovery_attempt' : true ,
122
+ } ) ;
123
+ const successful_catches = await launches . countDocuments ( {
124
+ upcoming : false ,
125
+ launch_success : true ,
126
+ 'rocket.fairings.ship' : 'MR STEVEN' ,
127
+ 'rocket.fairings.recovered' : true ,
128
+ } ) ;
129
+ console . log ( `Attempts: ${ attempted_catches } ` ) ;
130
+ console . log ( `Successes: ${ successful_catches } \n` ) ;
131
+ await col . updateOne ( { ship_id : name } , { $set : { attempted_catches, successful_catches } } ) ;
132
+ }
114
133
} ) ;
115
134
} ;
116
- await start ( ) ;
135
+ // await start();
117
136
await finish ( ) ;
118
137
console . log ( `Updated ${ id . length } ships` ) ;
119
138
You can’t perform that action at this time.
0 commit comments