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.

Filename, size & hash SHA256 hash help File type Python version Upload date
greentasks-2.0.post2.tar.gz (11.5 kB) Copy SHA256 hash SHA256 Source None Sep 15, 2016
greentasks-2.0.post2.zip (18.3 kB) Copy SHA256 hash SHA256 Source None Sep 15, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page