mirror of
https://github.com/perstarkse/minne.git
synced 2026-07-13 16:22:52 +02:00
fix: remove remnant job table, normalize taskstatus enum
This commit is contained in:
@@ -44,7 +44,7 @@ pub async fn run_worker_loop(
|
||||
Action::Update => {
|
||||
match notification.data.status {
|
||||
IngestionTaskStatus::Completed
|
||||
| IngestionTaskStatus::Error(_)
|
||||
| IngestionTaskStatus::Error { .. }
|
||||
| IngestionTaskStatus::Cancelled => {
|
||||
info!(
|
||||
"Skipping already completed/error/cancelled task: {}",
|
||||
@@ -58,7 +58,7 @@ pub async fn run_worker_loop(
|
||||
db.get_item::<IngestionTask>(¬ification.data.id).await
|
||||
{
|
||||
match current_task.status {
|
||||
IngestionTaskStatus::Error(_)
|
||||
IngestionTaskStatus::Error { .. }
|
||||
if attempts
|
||||
< common::storage::types::ingestion_task::MAX_ATTEMPTS =>
|
||||
{
|
||||
|
||||
@@ -72,7 +72,9 @@ impl IngestionPipeline {
|
||||
if current_attempts >= MAX_ATTEMPTS {
|
||||
IngestionTask::update_status(
|
||||
&task.id,
|
||||
IngestionTaskStatus::Error(format!("Max attempts reached: {}", e)),
|
||||
IngestionTaskStatus::Error {
|
||||
message: format!("Max attempts reached: {}", e),
|
||||
},
|
||||
&self.db,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user