20: Fix compilatoin of PushoverAlarmAction
This commit is contained in:
@@ -18,7 +18,7 @@ public final class PushoverAlarmAction implements AlarmAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void trigger(OraclePrice price, PriceAlarmDefinition alarm) {
|
public void trigger(OraclePrice price, ResolvedPriceAlarm alarm) {
|
||||||
String title = "Jupiter Perps " + price.asset() + " alarm";
|
String title = "Jupiter Perps " + price.asset() + " alarm";
|
||||||
String message = createMessage(price, alarm);
|
String message = createMessage(price, alarm);
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public final class PushoverAlarmAction implements AlarmAction {
|
|||||||
form("user", userKey) + "&" +
|
form("user", userKey) + "&" +
|
||||||
form("title", title) + "&" +
|
form("title", title) + "&" +
|
||||||
form("message", message) + "&" +
|
form("message", message) + "&" +
|
||||||
createPushoverSeverityParameters(alarm.severity());;
|
createPushoverSeverityParameters(alarm.severity());
|
||||||
|
|
||||||
HttpRequest request = HttpRequest.newBuilder(PUSHOVER_URI)
|
HttpRequest request = HttpRequest.newBuilder(PUSHOVER_URI)
|
||||||
.timeout(Duration.ofSeconds(15))
|
.timeout(Duration.ofSeconds(15))
|
||||||
@@ -69,7 +69,7 @@ public final class PushoverAlarmAction implements AlarmAction {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String createMessage(OraclePrice price, PriceAlarmDefinition alarm) {
|
private static String createMessage(OraclePrice price, ResolvedPriceAlarm alarm) {
|
||||||
return String.format(
|
return String.format(
|
||||||
"%d - %s: %s%n%n%s is %s USD.%nTarget: %s %s USD.%nOracle time: %s.%nSlot: %d.",
|
"%d - %s: %s%n%n%s is %s USD.%nTarget: %s %s USD.%nOracle time: %s.%nSlot: %d.",
|
||||||
alarm.id(),
|
alarm.id(),
|
||||||
@@ -78,7 +78,7 @@ public final class PushoverAlarmAction implements AlarmAction {
|
|||||||
price.asset(),
|
price.asset(),
|
||||||
price.priceUsd().toPlainString(),
|
price.priceUsd().toPlainString(),
|
||||||
alarm.direction(),
|
alarm.direction(),
|
||||||
alarm.targetExpression(),
|
alarm.target().toPlainString(),
|
||||||
price.oracleTime(),
|
price.oracleTime(),
|
||||||
price.slot()
|
price.slot()
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user