Skip to main content

A simple task scheduler, built on top of gevent.

Project description

A very simplistic task scheduler built around gevent.

Usage

  1. Create a task scheduler instance:

    from greentasks import TaskScheduler
    
    scheduler = TaskScheduler()
  2. Implement a task:

    from greentasks import Task
    
    class AwesomeTask(Task):
        name = 'awesome'
        delay = 10
        periodic = True
    
        def run(self, arg1, kw=None):
            return arg1
  3. Schedule the task for asynchronous execution:

    packaged_task = scheduler.schedule(AwesomeTask)
  4. 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)

Uploaded Source

greentasks-2.0.post2.tar.gz (11.5 kB view details)

Uploaded Source

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

Hashes for greentasks-2.0.post2.zip
Algorithm Hash digest
SHA256 a1d6c485887984a8e1b606dfe82f458c66b7a1b3e6dcf0a139abd82dfdb9ef32
MD5 2ce2cb3a6c3fd82ac8ded6e5ec90eb66
BLAKE2b-256 f257481a72243ce3ae62a3adfd1c4f16dae3c1f46d9a636f7c3ccb2a1a09b9cd

See more details on using hashes here.

File details

Details for the file greentasks-2.0.post2.tar.gz.

File metadata

File hashes

Hashes for greentasks-2.0.post2.tar.gz
Algorithm Hash digest
SHA256 dda51661e291f9aba0f9f078a963799a4c206c3d7417b0df981f46bc56d07a17
MD5 c2e0bdda42b32c197e07ead72a068e76
BLAKE2b-256 730fe4a9f8beac44a2f23526b4375a11d8d746228530bfe741fac2254e48e930

See more details on using hashes here.

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