remove delete_task from the Replica API so it's not misused

This commit is contained in:
Dustin J. Mitchell 2020-11-29 13:46:52 -05:00
parent af7363f3aa
commit 1b7dbd0715
2 changed files with 4 additions and 3 deletions

View file

@ -49,4 +49,3 @@ mod test {
});
}
}

View file

@ -135,8 +135,10 @@ impl Replica {
}
/// Delete a task. The task must exist. Note that this is different from setting status to
/// Deleted; this is the final purge of the task.
pub fn delete_task(&mut self, uuid: &Uuid) -> Fallible<()> {
/// Deleted; this is the final purge of the task. This is not a public method as deletion
/// should only occur through expiration.
#[allow(dead_code)]
fn delete_task(&mut self, uuid: &Uuid) -> Fallible<()> {
// check that it already exists; this is a convenience check, as the task may already exist
// when this Create operation is finally sync'd with operations from other replicas
if self.taskdb.get_task(&uuid)?.is_none() {