Commit f3156c59 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

(cherry picked from commit e29361c7)
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 452896ed
......@@ -342,11 +342,7 @@ bool Task::restoreLinkedEntities()
std::shared_ptr<File> file;
if ( m_fileId != 0 )
{
// Should there be a sporadic failure, let's retry a few times before
// giving up on this file.
file = sqlite::Tools::withRetries( 3, []( MediaLibraryPtr ml, int64_t fileId ) {
return File::fetch( ml, fileId );
}, m_ml, m_fileId );
file = File::fetch( m_ml, m_fileId );
if ( file == nullptr )
{
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