A background task base on thread,easy to integer with any framework
Project description
simple_background_task
Features
- execute background task,with thread
- support multiple queue,eg memory/rocketmq(todo)
- easy to integrate with frameworks
Install
pip install simple_background_task
Usage
# start main process
from simple_background_task import BackgroundTask
BackgroundTask().start()
# start a background task
from simple_background_task import defer
def test_job():
pass
defer(
func=test_job,
arguments={
"args": [1, 2],
"kwargs": {"a": "b"}
}
)
Test
python -m pytest tests
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
Built Distribution
Close
Hashes for simple_background_task-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bdfa6b4acc82996de36ccea87edbc845911c84f8f1ac650b3951dc4e95dea87 |
|
MD5 | f305f745f80e22fe33ed7f4b80bd627a |
|
BLAKE2b-256 | 5101991890b48efe1a477f782151b73210d2120ab3a2430dc768eb2cf39a3fda |
Close
Hashes for simple_background_task-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dee98b9c0d268d1ca170a808281e1ff20c0e38091e93868c658b9bb935ad3ee9 |
|
MD5 | 3a9b40937c9490377558e20ac1132c94 |
|
BLAKE2b-256 | 9cd5e7ec5a95f4ca7d2ba65a918de5e02ced0e10e3427ef193fc516f92374b45 |