Some delay tweaks and created bat file to start the application instead of using application.properties

This commit is contained in:
elroy 2017-07-02 22:20:49 +02:00
parent 9e54035435
commit e95b04b2c7
4 changed files with 28 additions and 3 deletions
pom.xml
src/main/java/nl/komtek/gpi
start-application.bat

View File

@ -5,7 +5,7 @@
<groupId>nl.komtek</groupId>
<artifactId>GunbotProxyCommunity</artifactId>
<version>0.9.0</version>
<version>0.9.2</version>
<packaging>jar</packaging>
<name>GunbotProxyCommunity</name>

View File

@ -15,8 +15,10 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler;
import java.util.concurrent.Executor;
@ -56,6 +58,11 @@ public class Application {
return new SimpleAsyncTaskExecutor();
}
@Bean
public TaskScheduler taskScheduler() {
return new ConcurrentTaskScheduler();
}
@Bean
public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();

View File

@ -76,8 +76,8 @@ public class GunbotProxyService {
retryPolicy = new RetryPolicy()
.retryOn(failure -> failure instanceof Exception)
.withDelay(300, TimeUnit.MILLISECONDS)
.withMaxRetries(10);
.withDelay(500, TimeUnit.MILLISECONDS)
.withMaxRetries(6);
}
//@Cacheable(value = "BBChartData", key = "#currencyPair")

18
start-application.bat Normal file
View File

@ -0,0 +1,18 @@
set sp=--server.port=443
set sks=--server.ssl.key-store=classpath:poloniex.keystore
set sksp=--server.ssl.key-store-password=poloniex
set skp=--server.ssl.key-password=poloniex
set gbl=--gunbot.location=file://C:/Users/Elroy/OneDrive/Documents/GUNBOT_v3.3.2
set lnl=--logging.level.nl.komtek=DEBUG
REM This apiKey pair will do all the heavy lifting
set da=--default_apiKey=first api key
set ds=--default_apiSecret=your secret
REM This apiKey will do the buying and selling and orders canceling stuff. You can add more if you have lots of pairs buying and selling
set a=--apiKey1=another apiKey
set as=--apiSecret1=your secret
java -jar GunbotProxyCommunity-0.9.2.jar %sp% %sks% %sksp% %skp% %da% %ds% %a% %as% %lnl%
pause