Skip to main content

Store functions and methods for delayed callback

Project description

Call Queue provides a mixin class to store functions, methods, or any callable object with the associated arguments and keyword arguments.

Each Queuable object has a key, so queues can be separated by need.

It can be used directly:

#!/usr/bin/env python

from queueable import Queueable

Arthur = Queueable('human')

Trillian = Queuable('human')

Ford = Queuable('alien')

Zaphod = Queueable('alien')

def drink_tea(response):
        print "This stuff {}".format(response)

Arthur.queue(drink_tea, "tastes filthy") # Nothing happens

Ford.process_queue() # Nothing happens

Trillian.process_queue() # runs the queued drink_tea function

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for CallQueue, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size CallQueue-0.1.0.zip (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page