make Task index_uid an option

Not all task relate to an index. Tasks that don't have an index_uid set
to None
This commit is contained in:
ad hoc
2022-05-16 19:50:45 +02:00
parent 9935db86c7
commit aa50acb031
8 changed files with 79 additions and 35 deletions

View File

@ -74,7 +74,11 @@ pub enum TaskEvent {
#[cfg_attr(test, derive(proptest_derive::Arbitrary))]
pub struct Task {
pub id: TaskId,
pub index_uid: IndexUid,
/// The name of the index the task is targeting. If it isn't targeting any idex (i.e Dump task)
/// then this is None
// TODO: when next forward breaking dumps, it would be a good idea to move this field inside of
// the TaskContent.
pub index_uid: Option<IndexUid>,
pub content: TaskContent,
pub events: Vec<TaskEvent>,
}