auto polymerization single database task to bulk tasks and then oprate database
Project description
1. pip database_auto_bulk_operation
强大的自动批量聚合操作各种数据库,不需要再调用处手动去喂给批量调用方法一个个组装好了数组。
自动批量聚合操作数据库能减少客户端和数据库服务端的io往返次数,效率提升大。
包括支持mysql mongo redis elastic。
主要原理是批量操作对象内部有一个while 1的守护线程,不断的去自动组合列表任务,
然后调用各种数据库的的python包的批量操作方法。
同时加入一个atexit的钩子,防止守护线程随程序一起结束时候,掉一批还未批量插入的尾部任务。
各种数据库的更简单的批次操作,主要是不用再调用处手动切割分组来调用原生中间件操作类的批量操作方法
对于未知时间的离散任务能够自动批量聚合,这种情况下无法自己提前切割分组,使用此包的方式非常适合。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for database_auto_bulk_operation-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94734411e1d52eef0db5884a0083b5ec52359314cac9278850a19ca3668cc25e |
|
MD5 | 789ec32c25246874a7834dd1b572b6ff |
|
BLAKE2b-256 | 316f9ed8567c92c5c6dae7322413338707163dd645e9b32daef3b569be14c786 |