python - Sqlalchemy detect change in table -
in thread
check whenever particular value in database
table
changes. this:
def my_background_thread(): while true: check_for_changes_to_database if change: do_something()
i'm using mysql
, sqlalchemy
. sqlalchemy
provide way this?
do_something() can registered listener of sqlalchemy's 'set' event 'changes' in database.
eg.
listen('changes', 'set', do_something)
Comments
Post a Comment