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

Task: Don't remove tasks from database once completed

Otherwise there is no way to enforce a rescan of failed tasks, or no
easy/efficient way to force a full rescan
parent 890090b4
......@@ -149,9 +149,6 @@ void Parser::done( std::shared_ptr<parser::Task> t, parser::Task::Status status
// We won't process the next tasks, so we need to keep the number of "todo" operations coherent:
m_opToDo -= m_services.size() - serviceIdx;
}
// If the task is now completed, there is no need to store it in database anymore
if ( t->isCompleted() )
t->removeFromDB();
updateStats();
return;
}
......
......@@ -107,11 +107,6 @@ bool Task::isStepCompleted( Task::ParserStep step ) const
return ( static_cast<uint8_t>( m_step ) & static_cast<uint8_t>( step ) ) != 0;
}
bool Task::removeFromDB()
{
return destroy( m_ml, m_id );
}
void Task::startParserStep()
{
static const std::string req = "UPDATE " + policy::TaskTable::Name + " SET "
......
......@@ -114,7 +114,6 @@ public:
bool saveParserStep();
bool isCompleted() const;
bool isStepCompleted( ParserStep step ) const;
bool removeFromDB();
/**
* @brief startParserStep Do some internal book keeping to avoid restarting a step too many time
*/
......
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