fix: decouple manual tidy from vehicle assignment

This commit is contained in:
zgw
2026-07-24 11:37:43 +08:00
parent 947edbdbc8
commit 8b84459072
11 changed files with 240 additions and 66 deletions

View File

@@ -12,6 +12,7 @@ public class AlgorithmProperties {
private long tidyAutoScanMs = 600_000L;
private long tidyReconcileMs = 5_000L;
private int tidyClaimLeaseSeconds = 60;
private int tidyManualMaxConcurrency = 3;
private String tidyWcsSnapshotUrl = "http://localhost:8081/wcs2Wms/api/tidyVehicleSnapshot";
private String replayRunId = "";
private String replayDatabase = "";
@@ -62,6 +63,8 @@ public class AlgorithmProperties {
public void setTidyReconcileMs(long value) { this.tidyReconcileMs = value; }
public int getTidyClaimLeaseSeconds() { return tidyClaimLeaseSeconds; }
public void setTidyClaimLeaseSeconds(int value) { this.tidyClaimLeaseSeconds = value; }
public int getTidyManualMaxConcurrency() { return tidyManualMaxConcurrency; }
public void setTidyManualMaxConcurrency(int value) { this.tidyManualMaxConcurrency = value; }
public String getTidyWcsSnapshotUrl() { return tidyWcsSnapshotUrl; }
public void setTidyWcsSnapshotUrl(String value) { this.tidyWcsSnapshotUrl = value; }
public String getReplayRunId() { return replayRunId; }

View File

@@ -47,6 +47,7 @@ class AlgorithmConfigurationTest {
assertThat(properties.getTidyAutoScanMs()).isEqualTo(600_000L);
assertThat(properties.getTidyReconcileMs()).isEqualTo(5_000L);
assertThat(properties.getTidyClaimLeaseSeconds()).isEqualTo(60);
assertThat(properties.getTidyManualMaxConcurrency()).isEqualTo(3);
assertThat(properties.getTidyWcsSnapshotUrl()).contains("tidyVehicleSnapshot");
assertThat(properties.getReplayRunId()).isBlank();
assertThat(properties.getReplayDatabase()).isBlank();