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
Post a Comment