mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Merge pull request #13107 from overleaf/em-reenable-swap-job-test
Reenable swap job test in git bridge GitOrigin-RevId: 4fcef9d1b9a6ef169b14ec490b785daeb80ab418
This commit is contained in:
@@ -64,7 +64,7 @@ public interface SwapJob {
|
||||
if (!cfg.isPresent()) {
|
||||
return new NoopSwapJob();
|
||||
}
|
||||
if (!swapStore.isSafe()) {
|
||||
if (!swapStore.isSafe() && !cfg.get().getAllowUnsafeStores()) {
|
||||
Log.warn("Swap store '{}' is not safe; disabling swap job", swapStore.getClass().getSimpleName());
|
||||
return new NoopSwapJob();
|
||||
}
|
||||
|
||||
@@ -13,19 +13,22 @@ public class SwapJobConfig {
|
||||
private final int highGiB;
|
||||
private final long intervalMillis;
|
||||
private final String compressionMethod;
|
||||
private final boolean allowUnsafeStores;
|
||||
|
||||
public SwapJobConfig(
|
||||
int minProjects,
|
||||
int lowGiB,
|
||||
int highGiB,
|
||||
long intervalMillis,
|
||||
String compressionMethod
|
||||
String compressionMethod,
|
||||
boolean allowUnsafeStores
|
||||
) {
|
||||
this.minProjects = minProjects;
|
||||
this.lowGiB = lowGiB;
|
||||
this.highGiB = highGiB;
|
||||
this.intervalMillis = intervalMillis;
|
||||
this.compressionMethod = compressionMethod;
|
||||
this.allowUnsafeStores = allowUnsafeStores;
|
||||
}
|
||||
|
||||
public int getMinProjects() {
|
||||
@@ -44,6 +47,10 @@ public class SwapJobConfig {
|
||||
return intervalMillis;
|
||||
}
|
||||
|
||||
public boolean getAllowUnsafeStores() {
|
||||
return allowUnsafeStores;
|
||||
}
|
||||
|
||||
public SwapJob.CompressionMethod getCompressionMethod() {
|
||||
CompressionMethod result = SwapJob.stringToCompressionMethod(compressionMethod);
|
||||
if (result == null) {
|
||||
|
||||
Reference in New Issue
Block a user