Commit b71e7a9 1 parent cdfa37b commit b71e7a9 Copy full SHA for b71e7a9
File tree 2 files changed +5
-3
lines changed
src/main/java/de/wuespace/telestion/project/daedalus2/mongodb
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 36
36
" request-time-sync" ,
37
37
" a-gps-transmitter#request" ,
38
38
" tc-console-request" ,
39
- " reset-tc-counter"
39
+ " reset-tc-counter" ,
40
+ " csv-data-exporter#request"
40
41
],
41
42
"outboundPermitted" : [
42
43
" a-gps-transmitter#notify" ,
Original file line number Diff line number Diff line change @@ -79,9 +79,10 @@ public void onStop(Promise<Void> stopPromise) throws Exception {
79
79
private MongoClient client ;
80
80
81
81
private void handle (CSVDataRequest request , Message <Object > message ) {
82
+ logger .debug ("Get CSV iridium messages for target: {}" , request .target ());
82
83
getAllIridiumMessages (request .target ())
83
84
.map (this ::createCSVData )
84
- .onSuccess (message :: reply )
85
+ .onSuccess (data -> message . reply ( data . json ()) )
85
86
.onFailure (cause -> message .fail (500 , cause .getMessage ()));
86
87
}
87
88
@@ -92,7 +93,7 @@ private CSVData createCSVData(List<JsonObject> results) {
92
93
.map (this ::mergeInfos )
93
94
.collect (Collectors .joining ("\n " ));
94
95
95
- return new CSVData (0 , header + body );
96
+ return new CSVData (results . size () , header + body );
96
97
}
97
98
98
99
private Future <List <JsonObject >> getAllIridiumMessages (String target ) {
You can’t perform that action at this time.
0 commit comments