farewell: корзина, отметка отправки, быстрое редактирование, карточки списка
This commit is contained in:
@@ -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) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user