|
@@ -21,12 +21,15 @@ async function processTask(){
|
|
multipleStatements: true
|
|
multipleStatements: true
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ await connection.beginTransaction();
|
|
|
|
+
|
|
let sql = `SELECT * FROM filter_data WHERE tg_platform_id = ${tg_platform_id} AND status = 0 AND weight = 0 LIMIT 1`
|
|
let sql = `SELECT * FROM filter_data WHERE tg_platform_id = ${tg_platform_id} AND status = 0 AND weight = 0 LIMIT 1`
|
|
|
|
|
|
const [row] = await connection.execute(sql)
|
|
const [row] = await connection.execute(sql)
|
|
|
|
|
|
|
|
|
|
if(row.length<=0){
|
|
if(row.length<=0){
|
|
|
|
+ await connection.commit();
|
|
throw 0
|
|
throw 0
|
|
}
|
|
}
|
|
|
|
|
|
@@ -56,6 +59,7 @@ async function processTask(){
|
|
sql
|
|
sql
|
|
);
|
|
);
|
|
|
|
|
|
|
|
+ await connection.commit();
|
|
}catch(e){
|
|
}catch(e){
|
|
if(e==0){
|
|
if(e==0){
|
|
right_status = false
|
|
right_status = false
|