Commit e29361c7 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Task: Simplify

All read operations are already retried in case of spurious failure
parent 4b4380f4
...@@ -342,11 +342,7 @@ bool Task::restoreLinkedEntities() ...@@ -342,11 +342,7 @@ bool Task::restoreLinkedEntities()
std::shared_ptr<File> file; std::shared_ptr<File> file;
if ( m_fileId != 0 ) if ( m_fileId != 0 )
{ {
// Should there be a sporadic failure, let's retry a few times before file = File::fetch( m_ml, m_fileId );
// giving up on this file.
file = sqlite::Tools::withRetries( 3, []( MediaLibraryPtr ml, int64_t fileId ) {
return File::fetch( ml, fileId );
}, m_ml, m_fileId );
if ( file == nullptr ) if ( file == nullptr )
{ {
LOG_WARN( "Failed to restore file associated to the task. Task will " LOG_WARN( "Failed to restore file associated to the task. Task will "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment