@@ -53,13 +53,16 @@ public class ScheduleSender {
53
53
private final AircraftUtils aircraftUtils ;
54
54
private final List <Map <String , List <String >>> aircraftFamiliesCodes ;
55
55
private final UnitsUtils unitsUtils ;
56
+ private final LoggingUtils loggingUtils ;
56
57
private final WebClient apiWebClient ;
57
58
private final BotSender botSender ;
58
59
59
60
@ Transactional
60
61
@ Scheduled (fixedDelay = SCHEDULED_FLIGHTS_CHECK_DELAY_IN_MINUTES , timeUnit = TimeUnit .MINUTES )
61
62
public void sendNewScheduledAndLiveWideBodyFlights () throws InterruptedException {
62
- log .info ("Schedule sending wide body flights started..." );
63
+ log .info ("Schedule sending wide-body flights started..." );
64
+
65
+ long startTime = System .currentTimeMillis ();
63
66
64
67
List <String > uniqueAirports = userService .findUniqueAirports ();
65
68
Map <String , FlightsDto > uniqueAirportsFlights = new HashMap <>();
@@ -165,14 +168,19 @@ public void sendNewScheduledAndLiveWideBodyFlights() throws InterruptedException
165
168
}
166
169
}
167
170
}
168
- log .info ("Schedule sending wide body flights finished." );
171
+
172
+ long endTime = System .currentTimeMillis ();
173
+
174
+ log .info ("Schedule sending wide-body flights finished. {}" , loggingUtils .getFinishedProcessTime (startTime , endTime ));
169
175
}
170
176
171
177
@ Transactional
172
178
@ Scheduled (fixedDelay = LANDING_FLIGHTS_CHECK_DELAY_IN_MINUTES , timeUnit = TimeUnit .MINUTES )
173
179
public void sendLandingWideBodyFlights () throws InterruptedException {
174
180
log .info ("Schedule sending landing flights started..." );
175
181
182
+ long startTime = System .currentTimeMillis ();
183
+
176
184
List <FlightEntity > uniqueRegistrations = flightService .findUniqueFlightsRegistrations ();
177
185
List <FlightDataDto > flightDataDtos = new ArrayList <>();
178
186
@@ -251,12 +259,18 @@ public void sendLandingWideBodyFlights() throws InterruptedException {
251
259
}
252
260
}
253
261
}
254
- log .info ("Schedule sending landing flights finished." );
262
+
263
+ long endTime = System .currentTimeMillis ();
264
+
265
+ log .info ("Schedule sending landing flights finished. {}" , loggingUtils .getFinishedProcessTime (startTime , endTime ));
255
266
}
256
267
257
268
@ Scheduled (fixedDelay = AN_124_FLIGHTS_CHECK_DELAY_IN_MINUTES , timeUnit = TimeUnit .MINUTES )
258
269
public void sendNewAn124Flights () {
259
270
log .info ("Schedule sending An-124 flights started..." );
271
+
272
+ long startTime = System .currentTimeMillis ();
273
+
260
274
List <UserEntity > users = userService .findAllUsers ();
261
275
262
276
An124FlightsDto an124FlightsDto ;
@@ -588,6 +602,9 @@ public void sendNewAn124Flights() {
588
602
}
589
603
}
590
604
}
591
- log .info ("Schedule sending An-124 flights finished." );
605
+
606
+ long endTime = System .currentTimeMillis ();
607
+
608
+ log .info ("Schedule sending An-124 flights finished. {}" , loggingUtils .getFinishedProcessTime (startTime , endTime ));
592
609
}
593
610
}
0 commit comments