diff --git a/pom.xml b/pom.xml
index 6b67bb9..cf37925 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
nl.komtek
GunbotProxyCommunity
- 0.9.3
+ 0.9.4
jar
GunbotProxyCommunity
diff --git a/src/main/java/nl/komtek/gpi/application/Application.java b/src/main/java/nl/komtek/gpi/application/Application.java
index 8e79cb1..e3aeaba 100644
--- a/src/main/java/nl/komtek/gpi/application/Application.java
+++ b/src/main/java/nl/komtek/gpi/application/Application.java
@@ -35,6 +35,8 @@ public class Application {
@Value("${server.additionalPort:8081}")
private int additionalPort;
+ @Value("${server.address:0.0.0.0}")
+ private String serverAddress;
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
@@ -75,6 +77,9 @@ public class Application {
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.setScheme("http");
connector.setPort(additionalPort);
+ if (!serverAddress.equals("0.0.0.0")) {
+ connector.setAttribute("address", serverAddress);
+ }
return connector;
}
}
diff --git a/src/main/java/nl/komtek/gpi/services/GunbotProxyService.java b/src/main/java/nl/komtek/gpi/services/GunbotProxyService.java
index 2f33d2e..9e19b48 100644
--- a/src/main/java/nl/komtek/gpi/services/GunbotProxyService.java
+++ b/src/main/java/nl/komtek/gpi/services/GunbotProxyService.java
@@ -65,7 +65,6 @@ public class GunbotProxyService {
return;
}
} else {
- logger.info("Running in multimarket MODE!");
if (!createMarketDefaultApiClients("BTC")) {
return;
}
diff --git a/src/main/java/nl/komtek/gpi/utils/ScheduledTasks.java b/src/main/java/nl/komtek/gpi/utils/ScheduledTasks.java
index 918ff17..a3d3288 100644
--- a/src/main/java/nl/komtek/gpi/utils/ScheduledTasks.java
+++ b/src/main/java/nl/komtek/gpi/utils/ScheduledTasks.java
@@ -1,6 +1,8 @@
package nl.komtek.gpi.utils;
import nl.komtek.gpi.services.GunbotProxyService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -11,9 +13,19 @@ import org.springframework.stereotype.Component;
@Component
public class ScheduledTasks {
+ private Logger logger = LogManager.getLogger(ScheduledTasks.class);
+
@Autowired
private GunbotProxyService gunbotProxyService;
+ @Scheduled(fixedDelay = Long.MAX_VALUE)
+ public void itWorks() {
+ if (gunbotProxyService.isUsingMultipleMarkets()) {
+ logger.info("Running in multimarket MODE!");
+ }
+ logger.info("Good job, It works!");
+ }
+
@Scheduled(fixedDelay = 2000)
public void updateTicker() {
gunbotProxyService.getTickerScheduled();
@@ -22,7 +34,7 @@ public class ScheduledTasks {
@Scheduled(fixedDelay = 9000)
public void updateCompleteBalances() {
String market = "default";
- if (gunbotProxyService.isUsingMultipleMarkets()){
+ if (gunbotProxyService.isUsingMultipleMarkets()) {
market = "BTC";
}
gunbotProxyService.getCompleteBalancesScheduled(market);
@@ -52,7 +64,7 @@ public class ScheduledTasks {
@Scheduled(fixedDelay = 1500)
public void updateTradeHistory() {
String market = "default";
- if (gunbotProxyService.isUsingMultipleMarkets()){
+ if (gunbotProxyService.isUsingMultipleMarkets()) {
market = "BTC";
}
gunbotProxyService.getTradeHistoryScheduled(market);
@@ -82,7 +94,7 @@ public class ScheduledTasks {
@Scheduled(fixedDelay = 2000)
public void updateOpenOrders() {
String market = "default";
- if (gunbotProxyService.isUsingMultipleMarkets()){
+ if (gunbotProxyService.isUsingMultipleMarkets()) {
market = "BTC";
}
gunbotProxyService.getOpenOrdersScheduled(market);
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index d1ff98a..1a13629 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -9,7 +9,7 @@
-
+