This commit is contained in:
parent
ce10dbafcc
commit
986fa4201b
3 changed files with 6 additions and 4 deletions
|
|
@ -67,8 +67,9 @@ ct.load-dir=D:\\folder_name\\signals
|
||||||
ct.monitoring-interval=${MONITORING_INTERVAL:15}
|
ct.monitoring-interval=${MONITORING_INTERVAL:15}
|
||||||
# days
|
# days
|
||||||
ct.update-flags-cron-expression=${UPDATE_FLAGS_CRON_EXPRESSION:0 25 18 * * *}
|
ct.update-flags-cron-expression=${UPDATE_FLAGS_CRON_EXPRESSION:0 25 18 * * *}
|
||||||
ct.update-fid-cron-expression=${UPDATE_FLAGS_CRON_EXPRESSION:0 10 12 * * *}
|
|
||||||
ct.days-to-update-flags=${DAYS_TO_UPDATE_FLAGS:30}
|
ct.days-to-update-flags=${DAYS_TO_UPDATE_FLAGS:30}
|
||||||
|
ct.update-fid-cron-expression=${UPDATE_FLAGS_CRON_EXPRESSION:0 10 12 * * *}
|
||||||
|
ct.days-to-update-fids=${DAYS_TO_UPDATE_FIDS:30}
|
||||||
|
|
||||||
ct.db-version=${DB_VERSION:1234}
|
ct.db-version=${DB_VERSION:1234}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ public class CreditTrackerSettings {
|
||||||
private Long monitoringInterval;
|
private Long monitoringInterval;
|
||||||
private String updateFlagsCronExpression;
|
private String updateFlagsCronExpression;
|
||||||
private Long daysToUpdateFlags;
|
private Long daysToUpdateFlags;
|
||||||
|
private Long daysToUpdateFids;
|
||||||
private String encoding;
|
private String encoding;
|
||||||
private String dbVersion;
|
private String dbVersion;
|
||||||
private Integer saverSubjectBatchSize;
|
private Integer saverSubjectBatchSize;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public class KickRecalcPipeLine implements IPipeLineStarter<SubjectPayload> {
|
||||||
protected final PackageRecordsService packageRecordsService;
|
protected final PackageRecordsService packageRecordsService;
|
||||||
protected final CreditTrackerSettings creditTrackerSettings;
|
protected final CreditTrackerSettings creditTrackerSettings;
|
||||||
private final int BATCH_SIZE;
|
private final int BATCH_SIZE;
|
||||||
private final Long daysToUpdateFlags;
|
private final Long daysToUpdateFids;
|
||||||
private boolean isInterrupted = false;
|
private boolean isInterrupted = false;
|
||||||
private PipelineContext<PackageVariable> context;
|
private PipelineContext<PackageVariable> context;
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class KickRecalcPipeLine implements IPipeLineStarter<SubjectPayload> {
|
||||||
this.packageRecordsService = packageRecordsService;
|
this.packageRecordsService = packageRecordsService;
|
||||||
this.creditTrackerSettings = creditTrackerSettings;
|
this.creditTrackerSettings = creditTrackerSettings;
|
||||||
this.BATCH_SIZE = creditTrackerSettings.getPipeline().subjectBatchSize();
|
this.BATCH_SIZE = creditTrackerSettings.getPipeline().subjectBatchSize();
|
||||||
this.daysToUpdateFlags = creditTrackerSettings.getDaysToUpdateFlags() != null ? creditTrackerSettings.getDaysToUpdateFlags() : 1;
|
this.daysToUpdateFids = creditTrackerSettings.getDaysToUpdateFids() != null ? creditTrackerSettings.getDaysToUpdateFids() : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class PipelineStarterException extends SignalClientException {
|
private static class PipelineStarterException extends SignalClientException {
|
||||||
|
|
@ -116,6 +116,6 @@ public class KickRecalcPipeLine implements IPipeLineStarter<SubjectPayload> {
|
||||||
return PipelineMode.REPEATED_RESTORE;
|
return PipelineMode.REPEATED_RESTORE;
|
||||||
}
|
}
|
||||||
protected List<PhonesMap> nextPage(int offset) {
|
protected List<PhonesMap> nextPage(int offset) {
|
||||||
return phonesMapMapper.searchedAtLessThan(daysToUpdateFlags.intValue(), BATCH_SIZE, offset);
|
return phonesMapMapper.searchedAtLessThan(daysToUpdateFids.intValue(), BATCH_SIZE, offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue