Skip to content

Commit d9eb694

Browse files
committed
feat: new entities
1 parent d324709 commit d9eb694

11 files changed

Lines changed: 21 additions & 46 deletions

backend/src/main/java/ch/xxx/trader/adapter/cron/PrepareDataTask.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public PrepareDataTask(BitstampService bitstampService, BitfinexService bitfinex
4040
this.coinbaseService = coinbaseService;
4141
}
4242

43-
@Async
43+
@Async("clientTaskExecutor")
4444
@Scheduled(cron = "0 5 0,12 ? * ?")
4545
@SchedulerLock(name = "bitstamp_avg_scheduledTask", lockAtLeastFor = "PT10H", lockAtMostFor = "PT11H")
4646
public void createBsAvg() {
@@ -53,7 +53,7 @@ public void createBsAvg() {
5353
}
5454
}
5555

56-
@Async
56+
@Async("clientTaskExecutor")
5757
@Scheduled(cron = "0 45 0,12 ? * ?")
5858
@SchedulerLock(name = "bitfinex_avg_scheduledTask", lockAtLeastFor = "PT10H", lockAtMostFor = "PT11H")
5959
public void createBfAvg() {
@@ -66,7 +66,7 @@ public void createBfAvg() {
6666
}
6767
}
6868

69-
@Async
69+
@Async("clientTaskExecutor")
7070
@Scheduled(cron = "0 10 2,14 ? * ?")
7171
@SchedulerLock(name = "coinbase_avg_scheduledTask", lockAtLeastFor = "PT10H", lockAtMostFor = "PT11H")
7272
public void createCbAvg() {

backend/src/main/java/ch/xxx/trader/adapter/cron/ScheduledTask.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void updateLoggedOutUsers() {
7878
this.myUserService.updateLoggedOutUsers();
7979
}
8080

81-
@Async("clientTaskExecutor")
81+
@Async
8282
@Scheduled(fixedRate = 60000, initialDelay = 3000)
8383
@SchedulerLock(name = "BitstampQuoteBTC_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
8484
public void insertBitstampQuoteBTC() {
@@ -115,31 +115,31 @@ private void logDuration(String source, String currPair, LocalTime start) {
115115
}
116116
}
117117

118-
@Async("clientTaskExecutor")
118+
@Async
119119
@Scheduled(fixedRate = 60000, initialDelay = 6000)
120120
@SchedulerLock(name = "BitstampQuoteETH_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
121121
public void insertBitstampQuoteETH() {
122122
String currPair = "etheur";
123123
this.insertBsQuote(currPair);
124124
}
125125

126-
@Async("clientTaskExecutor")
126+
@Async
127127
@Scheduled(fixedRate = 60000, initialDelay = 9000)
128128
@SchedulerLock(name = "BitstampQuoteLTC_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
129129
public void insertBitstampQuoteLTC() {
130130
String currPair = "ltceur";
131131
this.insertBsQuote(currPair);
132132
}
133133

134-
@Async("clientTaskExecutor")
134+
@Async
135135
@Scheduled(fixedRate = 60000, initialDelay = 12000)
136136
@SchedulerLock(name = "BitstampQuoteXRP_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
137137
public void insertBitstampQuoteXRP() {
138138
String currPair = "xrpeur";
139139
this.insertBsQuote(currPair);
140140
}
141141

142-
@Async("clientTaskExecutor")
142+
@Async
143143
@Scheduled(fixedRate = 60000, initialDelay = 15000)
144144
@SchedulerLock(name = "CoinbaseQuote_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
145145
public void insertCoinbaseQuote() {
@@ -158,39 +158,39 @@ public void insertCoinbaseQuote() {
158158
}
159159
}
160160

161-
@Async("clientTaskExecutor")
161+
@Async
162162
@Scheduled(fixedRate = 60000, initialDelay = 24000)
163163
@SchedulerLock(name = "BitstampQuoteBTCUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
164164
public void insertBitstampQuoteBTCUSD() {
165165
String currPair = "btcusd";
166166
this.insertBsQuote(currPair);
167167
}
168168

169-
@Async("clientTaskExecutor")
169+
@Async
170170
@Scheduled(fixedRate = 60000, initialDelay = 27000)
171171
@SchedulerLock(name = "BitstampQuoteETHUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
172172
public void insertBitstampQuoteETHUSD() {
173173
String currPair = "ethusd";
174174
this.insertBsQuote(currPair);
175175
}
176176

177-
@Async("clientTaskExecutor")
177+
@Async
178178
@Scheduled(fixedRate = 60000, initialDelay = 30000)
179179
@SchedulerLock(name = "BitstampQuoteLTCUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
180180
public void insertBitstampQuoteLTCUSD() {
181181
String currPair = "ltcusd";
182182
this.insertBsQuote(currPair);
183183
}
184184

185-
@Async("clientTaskExecutor")
185+
@Async
186186
@Scheduled(fixedRate = 60000, initialDelay = 33000)
187187
@SchedulerLock(name = "BitstampQuoteXRPUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
188188
public void insertBitstampQuoteXRPUSD() {
189189
String currPair = "xrpusd";
190190
this.insertBsQuote(currPair);
191191
}
192192

193-
@Async("clientTaskExecutor")
193+
@Async
194194
@Scheduled(fixedRate = 60000, initialDelay = 36000)
195195
@SchedulerLock(name = "BitfinexQuoteBTCUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
196196
public void insertBitfinexQuoteBTCUSD() {
@@ -228,23 +228,23 @@ private QuoteBf checkBfTimestamp(QuoteBf res) {
228228
return result;
229229
}
230230

231-
@Async("clientTaskExecutor")
231+
@Async
232232
@Scheduled(fixedRate = 60000, initialDelay = 39000)
233233
@SchedulerLock(name = "BitfinexQuoteETHUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
234234
public void insertBitfinexQuoteETHUSD() {
235235
String currPair = "ethusd";
236236
this.insertBfQuote(currPair);
237237
}
238238

239-
@Async("clientTaskExecutor")
239+
@Async
240240
@Scheduled(fixedRate = 60000, initialDelay = 42000)
241241
@SchedulerLock(name = "BitfinexQuoteLTCUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
242242
public void insertBitfinexQuoteLTCUSD() {
243243
String currPair = "ltcusd";
244244
this.insertBfQuote(currPair);
245245
}
246246

247-
@Async("clientTaskExecutor")
247+
@Async
248248
@Scheduled(fixedRate = 60000, initialDelay = 45000)
249249
@SchedulerLock(name = "BitfinexQuoteXRPUSD_scheduledTask", lockAtLeastFor = "PT50S", lockAtMostFor = "PT55S")
250250
public void insertBitfinexQuoteXRPUSD() {

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteBsMongoRepository.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,4 @@
2727
public interface QuoteBsMongoRepository extends MongoRepository<QuoteBs, ObjectId>,
2828
QuoteBsRepository {
2929

30-
Optional<QuoteBs> findFirstByOrderByCreatedAtDesc();
31-
32-
Optional<QuoteBs> findFirstByOrderByCreatedAtAsc();
3330
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteCbMongoRepository.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,4 @@
2626

2727
public interface QuoteCbMongoRepository extends MongoRepository<QuoteCb, ObjectId>,
2828
QuoteCbRepository {
29-
30-
Optional<QuoteCb> findFirstByOrderByCreatedAtDesc();
31-
32-
Optional<QuoteCb> findFirstByOrderByCreatedAtAsc();
3329
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteDayBfMongoRepository.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,4 @@
2424

2525
public interface QuoteDayBfMongoRepository extends MongoRepository<QuoteDayBf, ObjectId>,
2626
QuoteDayBfRepository {
27-
28-
Optional<QuoteDayBf> findFirstByOrderByCreatedAtDesc();
29-
30-
Optional<QuoteDayBf> findFirstByOrderByCreatedAtAsc();
3127
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteDayBsMongoRepository.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,4 @@
2525
public interface QuoteDayBsMongoRepository extends MongoRepository<QuoteDayBs, ObjectId>,
2626
QuoteDayBsRepository {
2727

28-
Optional<QuoteDayBs> findFirstByOrderByCreatedAtDesc();
29-
30-
Optional<QuoteDayBs> findFirstByOrderByCreatedAtAsc();
3128
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteDayCbMongoRepository.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@
2424

2525
public interface QuoteDayCbMongoRepository extends MongoRepository<QuoteDayCb, ObjectId>,
2626
QuoteDayCbRepository {
27-
28-
Optional<QuoteDayCb> findFirstByOrderByCreatedAtDesc();
29-
30-
Optional<QuoteDayCb> findFirstByOrderByCreatedAtAsc();
27+
3128
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteHourBfMongoRepository.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@
2424

2525
public interface QuoteHourBfMongoRepository extends MongoRepository<QuoteHourBf, ObjectId>,
2626
QuoteHourBfRepository {
27-
28-
Optional<QuoteHourBf> findFirstByOrderByCreatedAtDesc();
29-
30-
Optional<QuoteHourBf> findFirstByOrderByCreatedAtAsc();
27+
3128
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteHourBsMongoRepository.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@
2424

2525
public interface QuoteHourBsMongoRepository extends MongoRepository<QuoteHourBs, ObjectId>,
2626
QuoteHourBsRepository {
27-
28-
Optional<QuoteHourBs> findFirstByOrderByCreatedAtDesc();
29-
30-
Optional<QuoteHourBs> findFirstByOrderByCreatedAtAsc();
27+
3128
}

backend/src/main/java/ch/xxx/trader/adapter/repository/QuoteHourCbMongoRepository.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,4 @@
2727
public interface QuoteHourCbMongoRepository extends MongoRepository<QuoteHourCb, ObjectId>,
2828
QuoteHourCbRepository {
2929

30-
Optional<QuoteHourCb> findFirstByOrderByCreatedAtDesc();
31-
32-
Optional<QuoteHourCb> findFirstByOrderByCreatedAtAsc();
3330
}

0 commit comments

Comments
 (0)