ProcessQueueSorted
- class jwst.associations.ProcessQueueSorted(init=None)[source]
Bases:
object
Sort ProcessItem based on work_over
Create a generator that implements a First-In-First-Out (FIFO) queue, with the one modification that the queues are handled in order of their
work_over
priority. For example, even if a ProcessList with work_over of ListCategory.EXISTING had been added to the queue before a ProcessList with work_over of ListCategory.RULES, the second ProcessList will be returned before the first.ProcessQueueSorted is also mutable: ProcessLists can be added to the queue while the lists are being popped from the queue. When doing so, it is important to remember that the order of return, as described above, still pertains. For example, if the queue only has ProcessLists of work_over ListCategory.EXISTING, and a new ProcessList of work_over ListCategory.RULES is added during iteration, the next list returned will be the RULES one, because the RULES lists have priority over EXISTING lists, regardless of when the list was added.
- Parameters:
init ([ProcessList[,...]]) – List of
ProcessList
to start the queue with.
Methods Summary
extend
(process_lists)Add the list of process items to their appropriate queues
Methods Documentation