Skip to main content

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

This version

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

database_auto_bulk_operation-1.1.tar.gz (5.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page