Repository navigation
Threads
Oleg Gurov edited this page Oct 27, 2020
·
11 revisions
db_converter supports parallel deployment of packets. To implement this functionality, it is planned to create a pair of threads for each processed database:
-
lock_observer- observes locks and manages executed queries -
worker_db_func- performs steps and actions, and also decides to continue working or interrupt the package execution when various kinds of exceptions occur
The --seq option disables parallel execution in cases when --db-name contains a comma-separated list of several bases, or has the value ALL.
class DBCCore:
@threaded
def lock_observer(self, thread_name, db_conn_str, db_name, app_name_postfix):
...
@threaded
def worker_db_func(self, thread_name, db_conn_str, db_name, packet_name, read_only):
...