Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
ialbert 2023-02-02 16:14:17 +03:00
commit 89839b7da2
8 changed files with 14 additions and 3 deletions

View file

@ -501,7 +501,7 @@ public class PaymentInstructionCreator {
Long lmId = liabilitiesClaimsAssets.getLiabilitiesClaimsMoneyId();
log.debug("Update LiabilitiesClaimsMoney[{}] by paymentInstructions {}", lmId, paymentInstructions.stream().map(SpcexObjectBase::getId).collect(Collectors.toList()));
LiabilitiesClaimsMoney liabilitiesClaimsMoney = liabilitiesClaimsMoneyImdg.getSingleObjectByID(lmId); // update data for update
if (liabilitiesClaimsAssets == null) {
if (liabilitiesClaimsMoney == null) {
throw new RuntimeException("IMDG not found LiabilitiesClaimsMoney.id=" + lmId);
}
if (!Objects.equals(liabilitiesClaimsMoney.getSettlementDate(), liabilitiesClaimsAssets.getSettlementDate())) {

View file

@ -109,6 +109,9 @@ public abstract class AbstractHazelcastLifecycleSupport implements InitializingB
}
} catch (InterruptedException | ExecutionException e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
throw new RuntimeException("MapStore multithreaded not complete.", e);
}

View file

@ -72,7 +72,7 @@ public abstract class AbstractReportCollector<T extends AbstractReport> {
*/
protected String toString(Double val) {
if (val == null) return "";
return String.format(Locale.US, "%.2f", val.doubleValue());
return String.format(Locale.US, "%.2f", val);
}
/**

View file

@ -187,7 +187,6 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial
}
MoneyMarketSecurity mms = validator.getStored(Stored.PresentById);
mms.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey());
Instant.now();
mms.setUpdated(Instant.now());
moneyMarketSecurityMap.update(mms);
Listing listing = listingImdg.getSingleObjectByFieldValues(Map.of("securityId", mms.getId()));

View file

@ -262,6 +262,7 @@ public abstract class HazelcastServiceBase
lock.wait();
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error(ExceptionUtils.getStackTrace(e));
}
}

View file

@ -84,12 +84,14 @@ public final class HazelcastHelper {
log.info("Hazelcast: TextErrorService done");
done = true;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Thread interrupted when waiting storage ready.", e);
} catch (Exception e) {
log.info(String.format("Waiting Hazelcast: %s -> %s", e.getClass().getSimpleName(), e.getMessage()));
try {
Thread.sleep(100);
} catch (InterruptedException ignored) {
Thread.currentThread().interrupt();
throw new RuntimeException("Thread interrupted.", e);
}
}

View file

@ -127,6 +127,9 @@ public class QueueConsumer implements AutoCloseable {
send = producer.send(new ProducerRecord<>(Consts.REQUEST_INFO_UPDATE, req));
send.get();
} catch (Exception e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
log.error(ExceptionUtils.getStackTrace(e));
}
});

View file

@ -45,6 +45,9 @@ public class KafkaSender {
try {
send.get();
} catch (InterruptedException | ExecutionException e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
log.error(ExceptionUtils.getStackTrace(e));
return null;
}