fix clickhouse startup resilience across services
This commit is contained in:
parent
4579778a13
commit
522265686e
6 changed files with 9 additions and 9 deletions
|
|
@ -1,3 +1,3 @@
|
|||
<clickhouse>
|
||||
<yandex>
|
||||
<listen_host>0.0.0.0</listen_host>
|
||||
</clickhouse>
|
||||
</yandex>
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ const run = async () => {
|
|||
database: env.CLICKHOUSE_DATABASE
|
||||
});
|
||||
|
||||
await retry("clickhouse table init", 20, 500, async () => {
|
||||
await retry("clickhouse table init", 120, 500, async () => {
|
||||
await ensureOptionPrintsTable(clickhouse);
|
||||
await ensureOptionNBBOTable(clickhouse);
|
||||
await ensureEquityPrintsTable(clickhouse);
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ const run = async () => {
|
|||
database: env.CLICKHOUSE_DATABASE
|
||||
});
|
||||
|
||||
await retry("clickhouse table init", 20, 500, async () => {
|
||||
await retry("clickhouse table init", 120, 500, async () => {
|
||||
await ensureEquityCandlesTable(clickhouse);
|
||||
});
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ const run = async () => {
|
|||
error: getErrorMessage(error)
|
||||
});
|
||||
});
|
||||
await retry("redis connect", 20, 500, async () => {
|
||||
await retry("redis connect", 120, 500, async () => {
|
||||
if (!redis) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1138,7 +1138,7 @@ const run = async () => {
|
|||
logger.warn("redis client error", { error: error instanceof Error ? error.message : String(error) });
|
||||
});
|
||||
|
||||
await retry("redis connect", 20, 500, async () => {
|
||||
await retry("redis connect", 120, 500, async () => {
|
||||
await redis.connect();
|
||||
});
|
||||
|
||||
|
|
@ -1147,7 +1147,7 @@ const run = async () => {
|
|||
ttlSeconds: env.ROLLING_TTL_SEC
|
||||
};
|
||||
|
||||
await retry("clickhouse table init", 20, 500, async () => {
|
||||
await retry("clickhouse table init", 120, 500, async () => {
|
||||
await ensureFlowPacketsTable(clickhouse);
|
||||
await ensureEquityPrintJoinsTable(clickhouse);
|
||||
await ensureInferredDarkTable(clickhouse);
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ const run = async () => {
|
|||
database: env.CLICKHOUSE_DATABASE
|
||||
});
|
||||
|
||||
await retry("clickhouse table init", 20, 500, async () => {
|
||||
await retry("clickhouse table init", 120, 500, async () => {
|
||||
await ensureEquityPrintsTable(clickhouse);
|
||||
await ensureEquityQuotesTable(clickhouse);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ const run = async () => {
|
|||
database: env.CLICKHOUSE_DATABASE
|
||||
});
|
||||
|
||||
await retry("clickhouse table init", 20, 500, async () => {
|
||||
await retry("clickhouse table init", 120, 500, async () => {
|
||||
await ensureOptionPrintsTable(clickhouse);
|
||||
await ensureOptionNBBOTable(clickhouse);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue