20: Initialize AlarmVariableResolver
This commit is contained in:
@@ -13,6 +13,7 @@ public final class JupiterPerpsAlarmImpl {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Config config;
|
||||
|
||||
try {
|
||||
config = Config.parse(args, System.getenv());
|
||||
} catch (IllegalArgumentException exception) {
|
||||
@@ -29,6 +30,10 @@ public final class JupiterPerpsAlarmImpl {
|
||||
throw new IllegalStateException(errMsg, exception);
|
||||
}
|
||||
|
||||
AlarmVariableResolver variableResolver = new AlarmVariableResolver(
|
||||
AlarmConfigurationParser.constants()
|
||||
);
|
||||
|
||||
List<AlarmAction> actions = new ArrayList<>();
|
||||
actions.add(new ConsoleAlarmAction());
|
||||
|
||||
@@ -52,9 +57,10 @@ public final class JupiterPerpsAlarmImpl {
|
||||
Map<JupiterPerpsAsset, AssetPriceAlarmMonitor> monitors = new EnumMap<>(
|
||||
JupiterPerpsAsset.class
|
||||
);
|
||||
|
||||
definitionsByAsset.forEach((asset, assetDefinitions) -> monitors.put(
|
||||
asset,
|
||||
new AssetPriceAlarmMonitor(asset, assetDefinitions, action)
|
||||
new AssetPriceAlarmMonitor(asset, assetDefinitions, variableResolver, action)
|
||||
));
|
||||
|
||||
List<OracleWebSocketClient> clients = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user