A tiny job queue framework.
Project description
A tiny job queue framework.
Install
pip install tinyq
Usage
app.py
from tinyq import Application app = Application() @app.task() def add(m, n): return m + n
添加队列任务
for m in range(10): for n in range(3): add.delay(m, n)
启动 worker
$ tinyq 2017-02-19 22:58:50,676 - WARNING - runner - start - 72 - MainProcess - MainThread - Starting TinyQ worker, version 0.1.0... 2017-02-19 22:58:51,796 - INFO - worker - run_once - 56 - MainProcess - Worker-6 - Got a job: <Job: id: 91eb9414-7d61-4234-8ab7-b691f0c4e390, task_name: add> 2017-02-19 22:58:51,796 - INFO - worker - run_once - 58 - MainProcess - Worker-6 - Finish run job <Job: id: 91eb9414-7d61-4234-8ab7-b691f0c4e390, task_name: add> 2017-02-19 22:58:51,931 - INFO - worker - run_once - 56 - MainProcess - Worker-2 - Got a job: <Job: id: 10e4751f-6832-45df-8910-465725cc250d, task_name: add> 2017-02-19 22:58:51,931 - INFO - worker - run_once - 58 - MainProcess - Worker-2 - Finish run job <Job: id: 10e4751f-6832-45df-8910-465725cc250d, task_name: add> ^C2017-02-19 22:58:52,205 - WARNING - runner - start - 83 - MainProcess - MainThread - Warm shutdown... 2017-02-19 22:58:52,205 - WARNING - runner - start - 94 - MainProcess - MainThread - Exit worker. 2017-02-19 22:58:52,439 - WARNING - runner - func - 126 - MainProcess - Worker-5 - Exit worker Worker-5. 2017-02-19 22:58:52,488 - WARNING - runner - func - 126 - MainProcess - Worker-0 - Exit worker Worker-0. 2017-02-19 22:58:52,536 - WARNING - runner - func - 126 - MainProcess - Worker-3 - Exit worker Worker-3. 2017-02-19 22:58:52,972 - WARNING - runner - func - 126 - MainProcess - Worker-2 - Exit worker Worker-2. 2017-02-19 22:58:52,972 - WARNING - runner - func - 126 - MainProcess - Scheduler - Exit worker Scheduler. 2017-02-19 22:58:53,192 - WARNING - runner - func - 126 - MainProcess - Worker-7 - Exit worker Worker-7. 2017-02-19 22:58:53,542 - WARNING - runner - func - 126 - MainProcess - Worker-1 - Exit worker Worker-1. 2017-02-19 22:58:53,720 - WARNING - runner - func - 126 - MainProcess - Worker-6 - Exit worker Worker-6. 2017-02-19 22:58:53,917 - WARNING - runner - func - 126 - MainProcess - Worker-4 - Exit worker Worker-4. $
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
TinyQ-0.1.0.tar.gz
(7.2 kB
view details)
Built Distributions
tinyq-0.1.0-py2.py3-none-any.whl
(10.5 kB
view details)
TinyQ-0.1.0-py2.py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file TinyQ-0.1.0.tar.gz
.
File metadata
- Download URL: TinyQ-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb2017e60917f0bc4232e67b4d2cb1cb0d1a858051786d4589a86239b6bbf87 |
|
MD5 | 79358866b41f4edbcdb9abf9a777890a |
|
BLAKE2b-256 | 632984bfcb89d1efc1bd392ad71de85efabbe4721bde454b34b75fad79d85ce5 |
File details
Details for the file tinyq-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: tinyq-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 166985fdc68f1eda66c8ec8c223d9ec7ba1009de2584e96c9b889f702506dba0 |
|
MD5 | b49d46b35aae4321c37b64462cfe04ec |
|
BLAKE2b-256 | 731cc2481a06997a8c43a5841926ea4c2b39585fffcba8174f8a11021a3dc704 |
File details
Details for the file TinyQ-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: TinyQ-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21ed59f3bf53300f1b85f4a665a212c2012ab2d99740b3588269f81da4cba7f8 |
|
MD5 | d688b9dbc6cdd9dbfddc25a3eacaf18c |
|
BLAKE2b-256 | 99cf3746bed5f18e77b3cfb6a1f7e1a55e36af8328121f96b59617e69006563e |