Postgres version #1
3 changed files with 4 additions and 1 deletions
|
|
@ -60,7 +60,8 @@ public class CamelConfiguration extends RouteBuilder {
|
|||
.filter(exchange -> exchange.getIn().getBody(JsoCall.class).getPoint() != null)
|
||||
.process(exchange -> {
|
||||
JsoCall jsoCall = exchange.getIn().getBody(JsoCall.class);
|
||||
if (Point2D.distance(jsoCall.getPoint().getLat(), appProperties.myLat(), jsoCall.getPoint().getLng(), appProperties.myLong()) >= 2.0) {
|
||||
if (Point2D.distance(jsoCall.getPoint().getLat(), appProperties.myLat(), jsoCall.getPoint().getLng(), appProperties.myLong())
|
||||
>= appProperties.telegramNotificationThreshold()) {
|
||||
exchange.setRouteStop(true);
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -11,4 +11,5 @@ public interface AppProperties {
|
|||
String googleApiKey();
|
||||
double myLat();
|
||||
double myLong();
|
||||
double telegramNotificationThreshold();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ app.google-api-key=${GOOGLE_API_KEY}
|
|||
|
||||
app.my-lat=30.3025061
|
||||
app.my-long=-81.6436614
|
||||
app.telegram-notification-threshold=2.0
|
||||
|
||||
RABBITMQ_IP=192.168.1.117
|
||||
POSTGRES_IP=192.168.1.17
|
||||
|
|
|
|||
Loading…
Reference in a new issue