checkstyle fixes
This commit is contained in:
parent
d677d83cce
commit
f83663e43a
|
@ -12,7 +12,7 @@ import ca.uhn.fhir.rest.api.server.SystemRequestDetails;
|
||||||
import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
|
import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
|
||||||
import ca.uhn.fhir.rest.api.server.storage.TransactionDetails;
|
import ca.uhn.fhir.rest.api.server.storage.TransactionDetails;
|
||||||
|
|
||||||
public class BaseReindexStep {
|
public abstract class BaseReindexStep {
|
||||||
|
|
||||||
public static final int REINDEX_MAX_RETRIES = 10;
|
public static final int REINDEX_MAX_RETRIES = 10;
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,12 @@ public class CheckPendingReindexWorkStep implements IJobStepWorker<ReindexJobPar
|
||||||
|
|
||||||
if (!results.getResourceToHasWorkToComplete().isEmpty()) {
|
if (!results.getResourceToHasWorkToComplete().isEmpty()) {
|
||||||
if (myReindexJobService.anyResourceHasPendingReindexWork(results.getResourceToHasWorkToComplete())) {
|
if (myReindexJobService.anyResourceHasPendingReindexWork(results.getResourceToHasWorkToComplete())) {
|
||||||
// give time for reindex work to complete
|
/* CHECKSTYLE.OFF: RegexpSingleLine
|
||||||
|
* This exception is never fed to users and is only part of our structure
|
||||||
|
* So there's no need to use an error code
|
||||||
|
*/
|
||||||
throw new RetryChunkLaterException(ReindexUtils.getRetryLaterDelay());
|
throw new RetryChunkLaterException(ReindexUtils.getRetryLaterDelay());
|
||||||
|
/* CHECKSTYLE.ON: RegexpSingleLine */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,12 @@ public class ReindexStepV2 extends BaseReindexStep
|
||||||
resourceTypesToCheckFlag.put(id.getResourceType(), true);
|
resourceTypesToCheckFlag.put(id.getResourceType(), true);
|
||||||
});
|
});
|
||||||
if (myReindexJobService.anyResourceHasPendingReindexWork(resourceTypesToCheckFlag)) {
|
if (myReindexJobService.anyResourceHasPendingReindexWork(resourceTypesToCheckFlag)) {
|
||||||
|
/* CHECKSTYLE.OFF: RegexpSingleLine
|
||||||
|
* This exception is never fed to users and is only part of our structure
|
||||||
|
* So there's no need to use an error code
|
||||||
|
*/
|
||||||
throw new RetryChunkLaterException(ReindexUtils.getRetryLaterDelay());
|
throw new RetryChunkLaterException(ReindexUtils.getRetryLaterDelay());
|
||||||
|
/* CHECKSTYLE.ON: RegexpSingleLine */
|
||||||
}
|
}
|
||||||
|
|
||||||
ReindexResults results = doReindex(
|
ReindexResults results = doReindex(
|
||||||
|
|
Loading…
Reference in New Issue