logic: Fixed refreshing when source paths were removed
* Define exit state for TaskRepeatWhileSuccess * Added TaskFinishParsing to end of parsing task sequence * Also measure time spend clearing files in total index time
This commit is contained in:
@@ -79,7 +79,6 @@ void TaskGroupParallel::processTaskThreaded(std::shared_ptr<TaskInfo> taskInfo,
|
||||
m_activeTaskCount--;
|
||||
});
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
TaskState state = taskInfo->taskRunner->update(blackboard);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "utility/scheduling/TaskRepeatWhileSuccess.h"
|
||||
|
||||
TaskRepeatWhileSuccess::TaskRepeatWhileSuccess()
|
||||
TaskRepeatWhileSuccess::TaskRepeatWhileSuccess(TaskState exitState)
|
||||
: m_exitState(exitState)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -22,8 +23,12 @@ Task::TaskState TaskRepeatWhileSuccess::doUpdate(std::shared_ptr<Blackboard> bla
|
||||
|
||||
if (state == Task::STATE_SUCCESS)
|
||||
{
|
||||
state = Task::STATE_RUNNING;
|
||||
m_taskRunner->reset();
|
||||
state = Task::STATE_RUNNING;
|
||||
}
|
||||
else if (state == Task::STATE_FAILURE)
|
||||
{
|
||||
state = m_exitState;
|
||||
}
|
||||
|
||||
return state;
|
||||
|
||||
@@ -10,7 +10,7 @@ class TaskRepeatWhileSuccess
|
||||
: public TaskDecorator
|
||||
{
|
||||
public:
|
||||
TaskRepeatWhileSuccess();
|
||||
TaskRepeatWhileSuccess(TaskState exitState);
|
||||
|
||||
virtual void setTask(std::shared_ptr<Task> task);
|
||||
|
||||
@@ -21,6 +21,7 @@ private:
|
||||
virtual void doReset(std::shared_ptr<Blackboard> blackboard);
|
||||
|
||||
std::shared_ptr<TaskRunner> m_taskRunner;
|
||||
const TaskState m_exitState;
|
||||
};
|
||||
|
||||
#endif // TASK_REPEAT_WHILE_SUCCESS_H
|
||||
|
||||
Reference in New Issue
Block a user