move the version check to the task queue

This commit is contained in:
Tamo 2025-01-16 11:00:29 +01:00 committed by Louis Dureuil
parent e70ac35e02
commit 3ef7a478cd
No known key found for this signature in database
9 changed files with 95 additions and 72 deletions

View file

@ -147,7 +147,7 @@ pub enum Error {
#[error("Corrupted task queue.")]
CorruptedTaskQueue,
#[error(transparent)]
TaskDatabaseUpdate(Box<Self>),
TaskDatabaseUpgrade(Box<Self>),
#[error(transparent)]
HeedTransaction(heed::Error),
@ -202,7 +202,7 @@ impl Error {
| Error::Anyhow(_) => true,
Error::CreateBatch(_)
| Error::CorruptedTaskQueue
| Error::TaskDatabaseUpdate(_)
| Error::TaskDatabaseUpgrade(_)
| Error::HeedTransaction(_) => false,
#[cfg(test)]
Error::PlannedFailure => false,
@ -266,7 +266,7 @@ impl ErrorCode for Error {
Error::Anyhow(_) => Code::Internal,
Error::CorruptedTaskQueue => Code::Internal,
Error::CorruptedDump => Code::Internal,
Error::TaskDatabaseUpdate(_) => Code::Internal,
Error::TaskDatabaseUpgrade(_) => Code::Internal,
Error::CreateBatch(_) => Code::Internal,
// This one should never be seen by the end user