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)
|
.filter(exchange -> exchange.getIn().getBody(JsoCall.class).getPoint() != null)
|
||||||
.process(exchange -> {
|
.process(exchange -> {
|
||||||
JsoCall jsoCall = exchange.getIn().getBody(JsoCall.class);
|
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);
|
exchange.setRouteStop(true);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,5 @@ public interface AppProperties {
|
||||||
String googleApiKey();
|
String googleApiKey();
|
||||||
double myLat();
|
double myLat();
|
||||||
double myLong();
|
double myLong();
|
||||||
|
double telegramNotificationThreshold();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ app.google-api-key=${GOOGLE_API_KEY}
|
||||||
|
|
||||||
app.my-lat=30.3025061
|
app.my-lat=30.3025061
|
||||||
app.my-long=-81.6436614
|
app.my-long=-81.6436614
|
||||||
|
app.telegram-notification-threshold=2.0
|
||||||
|
|
||||||
RABBITMQ_IP=192.168.1.117
|
RABBITMQ_IP=192.168.1.117
|
||||||
POSTGRES_IP=192.168.1.17
|
POSTGRES_IP=192.168.1.17
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue