Package pulp :: Package server :: Package tasking :: Package queue :: Module storage :: Class VolatileStorage
[hide private]
[frames] | no frames]

Class VolatileStorage

source code

object --+
         |
        VolatileStorage

In memory queue storage class.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
all_tasks(self)
Return an iterator over all tasks currently in the queue in descending order by length of time in the queue.
source code
 
unfinished_tasks(self)
Return an iterator over all unfinished tasks in the queue in descending order by length of time in the queue.
source code
 
waiting_tasks(self)
Return an iterator over all waiting tasks in the queue, in descending order by the length of time in the queue.
source code
 
running_tasks(self)
Return an iterator over all running tasks in the queue, in descending order by the length of time in the queue.
source code
 
complete_tasks(self)
Return an iterator over all complete tasks in the queue, in descending order by the length of time in the queue.
source code
 
add_waiting_task(self, task)
Add a task to the wait queue.
source code
 
add_running_task(self, task)
Remove a task from the wait queue and add it to the running queue.
source code
 
add_complete_task(self, task)
Remove a task from the running queue and add it to the complete queue.
source code
 
remove_task(self, task)
Remove a task from storage.
source code
 
find_task(self, criteria)
Find a task in the storage based on the given criteria.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

all_tasks(self)

source code 

Return an iterator over all tasks currently in the queue in descending order by length of time in the queue.

Returns:
iterator

unfinished_tasks(self)

source code 

Return an iterator over all unfinished tasks in the queue in descending order by length of time in the queue.

Returns:
iterator

waiting_tasks(self)

source code 

Return an iterator over all waiting tasks in the queue, in descending order by the length of time in the queue.

Returns:
iterator

running_tasks(self)

source code 

Return an iterator over all running tasks in the queue, in descending order by the length of time in the queue.

Returns:
iterator

complete_tasks(self)

source code 

Return an iterator over all complete tasks in the queue, in descending order by the length of time in the queue.

Returns:
iterator

add_waiting_task(self, task)

source code 

Add a task to the wait queue.

Parameters:
  • task (Task instance) - task to add

add_running_task(self, task)

source code 

Remove a task from the wait queue and add it to the running queue.

Parameters:
  • task (Task instance) - task to add

add_complete_task(self, task)

source code 

Remove a task from the running queue and add it to the complete queue.

Parameters:
  • task (Task instance) - task to add

remove_task(self, task)

source code 

Remove a task from storage.

Parameters:
  • task (Task instance) - task to remove

find_task(self, criteria)

source code 

Find a task in the storage based on the given criteria.

Parameters:
  • criteria (dict) - dict of task attr -> value to match against
  • include_finished (bool)
Returns:
the last (newest) task in the queue that matches on success, None otherwise