Skip to content
Snippets Groups Projects
Commit 7f20d714 authored by Firat Yusuf Duran's avatar Firat Yusuf Duran :moyai:
Browse files

skill deletion remove skill from memory

parent 081d3592
No related branches found
No related tags found
2 merge requests!458Fluxio/dev get types,!449Fluxio preliminary release
......@@ -447,6 +447,24 @@ namespace armarx
const Ice::Current& current)
{
skills::manager::dto::FluxioIdentificatorList ret;
skills::Result<std::experimental::observer_ptr<const skills::FluxioSkill>,
skills::error::FluxioException>
res = this->plugin->getSkill(skillId);
if (!res.isSuccess())
{
ARMARX_WARNING << "Error getting skill with id " << skillId;
return {};
}
std::experimental::observer_ptr<const armarx::skills::FluxioSkill> skillptr =
res.getResult();
std::optional<skills::manager::arondto::FluxioSkill> opt = skillptr->toAronXml();
if (!opt.has_value())
{
ARMARX_WARNING << "Skill with id " << skillId << " could not be converted";
return {};
}
skills::manager::arondto::FluxioSkill skill = opt.value();
auto l = this->plugin->deleteSkill(skillId, userId, dryRun);
if (!l.has_value())
......@@ -464,6 +482,12 @@ namespace armarx
ret.push_back(s->toFluxioIdentificatorIce());
}
if (!dryRun)
{
skill.deleted = true;
saveSkill(skill);
}
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment