a distribute task scheduler
Project description
a distribute task scheduler
example
from distask import create_scheduler, task, register_job
client_data = {
"t": "mongo",
"args": ["mongodb://admin:123456@127.0.0.1:27017"]
}
lock_data = {
"t": "rllock",
"reentrant":True,
"connection_details":connection_details,
"ttl":10_000
}
scheduler = create_scheduler(client_data, lock_data, serialize="json", groups=['test'], limit=1, maxwait=5)
@register_job(scheduler, "interval", args=(12, 123), group="test", subgroup="ssss", seconds=3)
def test1(times, aa=None, bb=None, *args):
print("test---------------------", util.time_now())
because pickle not support lamba function, if you choose serialize type 'pickle' please install 'dill'
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
distask-0.1.6.tar.gz
(24.4 kB
view details)
File details
Details for the file distask-0.1.6.tar.gz.
File metadata
- Download URL: distask-0.1.6.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1474d9a8e24a53e8952a23b0d6364ba6474018e2d15690e296e1c73e9f23cc06
|
|
| MD5 |
54943765d5a3b4e54700438e1e343493
|
|
| BLAKE2b-256 |
b610927c1bee3b57f9ec17995eb5b52d7671aaab9c6d6693c6c379a534b0c031
|