A simple task scheduler, built on top of gevent.
Project description
A very simplistic task scheduler built around gevent.
Usage
Create a task scheduler instance:
from greentasks import TaskScheduler scheduler = TaskScheduler()
Implement a task:
from greentasks import Task class AwesomeTask(Task): name = 'awesome' delay = 10 periodic = True def run(self, arg1, kw=None): return arg1
Schedule the task for asynchronous execution:
packaged_task = scheduler.schedule(AwesomeTask)
Wait for the result (if needed):
result = packaged_task.result.get()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
greentasks-2.0.post2.zip
(18.3 kB
view details)
greentasks-2.0.post2.tar.gz
(11.5 kB
view details)
File details
Details for the file greentasks-2.0.post2.zip
.
File metadata
- Download URL: greentasks-2.0.post2.zip
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1d6c485887984a8e1b606dfe82f458c66b7a1b3e6dcf0a139abd82dfdb9ef32 |
|
MD5 | 2ce2cb3a6c3fd82ac8ded6e5ec90eb66 |
|
BLAKE2b-256 | f257481a72243ce3ae62a3adfd1c4f16dae3c1f46d9a636f7c3ccb2a1a09b9cd |
File details
Details for the file greentasks-2.0.post2.tar.gz
.
File metadata
- Download URL: greentasks-2.0.post2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dda51661e291f9aba0f9f078a963799a4c206c3d7417b0df981f46bc56d07a17 |
|
MD5 | c2e0bdda42b32c197e07ead72a068e76 |
|
BLAKE2b-256 | 730fe4a9f8beac44a2f23526b4375a11d8d746228530bfe741fac2254e48e930 |