The Call Queue stores functions and methods along with their arguments for later retrieval and processing.
Call Queue’s can be organized by a key. Objects that share the same key will share the same queue.
Queueable(queue_key)
Mixin class that allows ojects to share a queue of callable objects. It is intended to be mixed into interfaces for database objects.
Groups of instances can be given their own queues by differentiating the queue_key:
Parent = Queueable( 'family')
Sister = Queueable('family')
Brother = Queueable('family')
Cousin = Queueable('relative')
The first three objects share a queue, the fourth does not. Loading callables by Parent, Sister, or Brother can be executed by calling any of their process_queue() methods, and in doing so any callables in the ‘relative’ queue are untouched.
This is useful if you have a GUI interface that allows for a command-line interface as well. Both sets of interfaces can have their own queue.
Flag to check if a callable is already in the queue before adding it
Flag to check if a callable is already in the queue before adding it
Does the nth item in the queue
Flag to check if a callable is already in the queue before adding it
Flag to check if a callable is already in the queue before adding it
Returns a list of (callable, args, kwargs) tuples in the queue.
Returns a list of all callable objects without arguments
Calls each function in the Queable objects queue, and clears the queue afterward
Adds the function and arguments to the queue.
Returns a list of all used keys
Returns the length of the queue for this object
Contents: