Skip to content

Commit

Permalink
refactor: use ConstantManager
Browse files Browse the repository at this point in the history
  • Loading branch information
akardapolov committed Dec 31, 2019
1 parent 2f8c071 commit 9cec1d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ashv/src/main/java/core/thread/ClearDatabaseThread.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package core.thread;

import core.manager.ConnectionManager;
import core.manager.ConstantManager;
import core.processing.GetFromRemoteAndStore;
import lombok.extern.slf4j.Slf4j;
import store.OlapCacheManager;
Expand All @@ -27,8 +28,6 @@ public class ClearDatabaseThread {

private Timer timer = new Timer();

private int DAYS_RETAIN_MAX = 101;

@Inject
public ClearDatabaseThread(StoreManager storeManager,
OlapCacheManager olapCacheManager,
Expand Down Expand Up @@ -57,7 +56,7 @@ public void run() {
long start = 0L;
long end = getFromRemoteAndStore.getCurrServerTime() - TimeUnit.DAYS.toMillis(intDays); ;

if (intDays > 0 & intDays < DAYS_RETAIN_MAX) {
if (intDays > 0 & intDays < ConstantManager.RETAIN_DAYS_MAX) {
Instant startedAt = Instant.now();
log.info("Clear of database procedure started ..");

Expand Down

0 comments on commit 9cec1d3

Please sign in to comment.