mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(opensearch): keep readiness polling after errors (#3373)
* fix(opensearch): keep readiness polling after errors * test(opensearch): remove readiness timing dependency
This commit is contained in:
1 parent
3669c8e84c
commit
713a166a7c
2 files changed
+27
-2
No files matched your search
@@ -347,7 +347,11 @@ public class OpenSearchService implements ResourceProvider {
|
||||
}
|
||||
|
||||
private void startReadinessPoller() {
|
||||
poller.scheduleWithFixedDelay(() -> {
|
||||
poller.scheduleWithFixedDelay(this::pollReadiness, 3, 3, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
void pollReadiness() {
|
||||
try {
|
||||
for (Domain domain : allDomains()) {
|
||||
if (domain.isProcessing() && domainManager.isReady(domain)) {
|
||||
domain.setProcessing(false);
|
||||
@@ -356,7 +360,9 @@ public class OpenSearchService implements ResourceProvider {
|
||||
domain.getDomainName(), domain.getEndpoint());
|
||||
}
|
||||
}
|
||||
}, 3, 3, TimeUnit.SECONDS);
|
||||
} catch (RuntimeException e) {
|
||||
LOG.warn("OpenSearch readiness poll failed; will retry", e);
|
||||
}
|
||||
}
|
||||
|
||||
private List<Domain> allDomains() {
|
||||
|
||||
Reference in new issue
Block a user