mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-18 21:25:09 +01:00
Add more logs
This commit is contained in:
@@ -300,7 +300,10 @@ fn rusqlite_worker_manager(
|
||||
tracing::trace!("Tx {}: Commit", tx_id);
|
||||
let _ = reply_to.send(match tx.commit() {
|
||||
Ok(()) => DbResponse::Ok,
|
||||
Err(err) => DbResponse::Error(err.into()),
|
||||
Err(err) => {
|
||||
tracing::error!("Failed commit {:?}", err);
|
||||
DbResponse::Error(err.into())
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -308,7 +311,10 @@ fn rusqlite_worker_manager(
|
||||
tracing::trace!("Tx {}: Rollback", tx_id);
|
||||
let _ = reply_to.send(match tx.rollback() {
|
||||
Ok(()) => DbResponse::Ok,
|
||||
Err(err) => DbResponse::Error(err.into()),
|
||||
Err(err) => {
|
||||
tracing::error!("Failed rollback {:?}", err);
|
||||
DbResponse::Error(err.into())
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -319,7 +325,14 @@ fn rusqlite_worker_manager(
|
||||
tracing::trace!("Tx {}: SQL {}", tx_id, sql.sql);
|
||||
let _ = match process_query(&tx, sql) {
|
||||
Ok(ok) => reply_to.send(ok),
|
||||
Err(err) => reply_to.send(DbResponse::Error(err)),
|
||||
Err(err) => {
|
||||
tracing::error!(
|
||||
"Tx {}: Failed query with error {:?}",
|
||||
tx_id,
|
||||
err
|
||||
);
|
||||
reply_to.send(DbResponse::Error(err))
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user