Skip to content

Commit

Permalink
Reset Redis job status based on job file content on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Apr 16, 2024
1 parent 31333dd commit 19123bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/jobsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,13 @@ func MakeRedisJobSystem(config ConfigRedis, results string) (*RedisJobSystem, er
}
}
job, err := getJobRequestFromFile(file)
if err != nil || job.Status != StatusComplete {
if err != nil {
continue
}
if job.Status != StatusComplete {
job.Status = StatusError
jobsystem.SetStatus(job.Id, StatusError)
}
jobsystem.SetStatus(job.Id, job.Status)
}

return jobsystem, nil
Expand Down

0 comments on commit 19123bf

Please sign in to comment.