feat: Deploy HA auto-failover with database promotion
- Enhanced DNS failover monitor on secondary (72.62.39.24) - Auto-promotes database: pg_ctl promote on failover - Creates DEMOTED flag on primary via SSH (split-brain protection) - Telegram notifications with database promotion status - Startup safety script ready (integration pending) - 90-second automatic recovery vs 10-30 min manual - Zero-cost 95% enterprise HA benefit Status: DEPLOYED and MONITORING (14:52 CET) Next: Controlled failover test during maintenance
This commit is contained in:
@@ -475,6 +475,10 @@ export class SmartEntryTimer {
|
||||
const stopLossPrice = this.calculatePrice(fillPrice, slPercent, signal.direction)
|
||||
const tp1Price = this.calculatePrice(fillPrice, tp1Percent, signal.direction)
|
||||
const tp2Price = this.calculatePrice(fillPrice, tp2Percent, signal.direction)
|
||||
const effectiveTp2SizePercent =
|
||||
config.useTp2AsTriggerOnly && (config.takeProfit2SizePercent ?? 0) <= 0
|
||||
? 0
|
||||
: (config.takeProfit2SizePercent ?? 0)
|
||||
|
||||
// Dual stops if enabled
|
||||
let softStopPrice: number | undefined
|
||||
@@ -496,7 +500,7 @@ export class SmartEntryTimer {
|
||||
tp2Price,
|
||||
stopLossPrice,
|
||||
tp1SizePercent: config.takeProfit1SizePercent ?? 75,
|
||||
tp2SizePercent: config.takeProfit2SizePercent ?? 0,
|
||||
tp2SizePercent: effectiveTp2SizePercent,
|
||||
direction: signal.direction,
|
||||
useDualStops: config.useDualStops,
|
||||
softStopPrice,
|
||||
@@ -525,7 +529,7 @@ export class SmartEntryTimer {
|
||||
takeProfit1Price: tp1Price,
|
||||
takeProfit2Price: tp2Price,
|
||||
tp1SizePercent: config.takeProfit1SizePercent,
|
||||
tp2SizePercent: config.takeProfit2SizePercent,
|
||||
tp2SizePercent: effectiveTp2SizePercent,
|
||||
entryOrderTx: openResult.transactionSignature,
|
||||
atrAtEntry: signal.originalSignalData.atr,
|
||||
adxAtEntry: signal.originalSignalData.adx,
|
||||
|
||||
Reference in New Issue
Block a user