python - Is it possible to check for db updates before performing db.rollback() within a worker transaction? -


i'm using queue queue transactions mysql database in python. i'm using autocommit=false can rollback transaction if not of data queries executed properly.

i'm wondering whether it's possible check whether worker has performed action on database before performing db.rollback()? or can perform db.rollback if worker hasn't done database without errors occurring?

thanks!

if i've understood question correctly, not error rollback transaction nothing else has happened, although is error attempt rollback when no transaction exists. tell case can test mysqlconnection.in_transaction property.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -