Skip to main content

select_runnable_task_index

Function select_runnable_task_index 

Source
pub fn select_runnable_task_index(
    active: &QueueFile,
    done: Option<&QueueFile>,
    options: RunnableSelectionOptions,
) -> Option<usize>
Expand description

Select the next runnable task index according to the provided options.

Order:

  • If prefer_doing is true, prefer the first Doing task.
  • Otherwise, choose the first runnable Todo.
  • If include_draft is true and no runnable Todo exists, choose the first runnable Draft.