farewell: корзина, отметка отправки, быстрое редактирование, карточки списка

This commit is contained in:
dev
2026-11-12 13:44:29 +03:00
parent 0e0b3c7cfd
commit b527993716
8 changed files with 391 additions and 31 deletions
+2 -2
View File
@@ -1695,7 +1695,7 @@ function createFarewellWorker(opts) {
try {
await client.query('BEGIN');
const q = `SELECT * FROM farewell_messages
WHERE ai_status = 'pending'
WHERE ai_status = 'pending' AND deleted_at IS NULL
ORDER BY id ASC
FOR UPDATE SKIP LOCKED
LIMIT 1`;
@@ -1893,7 +1893,7 @@ function createFarewellWorker(opts) {
async function resetStale() {
try {
await pool.query(`UPDATE farewell_messages SET ai_status='pending', ai_error=NULL WHERE ai_status='processing'`);
await pool.query(`UPDATE farewell_messages SET ai_status='pending', ai_error=NULL WHERE ai_status='processing' AND deleted_at IS NULL`);
} catch (e) {}
}