fix(scheduled-runner): ретрай транзиентных ошибок отправки (522/5xx/429/сеть) вместо мгновенного failed + send_attempts

This commit is contained in:
ZeroDay
2026-07-07 06:50:46 +00:00
parent 4ff1bd51d9
commit 821d9ac66c
2 changed files with 34 additions and 6 deletions
+1
View File
@@ -224,6 +224,7 @@ const migrate = async () => {
// safe column alters (existing tables on prod may lack newer columns)
await query(`ALTER TABLE categories ADD COLUMN IF NOT EXISTS is_active BOOLEAN DEFAULT true`);
await query(`ALTER TABLE scheduled_posts ADD COLUMN IF NOT EXISTS send_attempts INT NOT NULL DEFAULT 0`);
console.log('[DB] Migrations applied');
};