Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
3cad06fc
Commit
3cad06fc
authored
1 year ago
by
Fabian Tërnava
Browse files
Options
Downloads
Patches
Plain Diff
fix old time names in ltm export
parent
1c89746c
No related branches found
Branches containing commit
No related tags found
2 merge requests
!441
Draft: Armem/ltm/dev
,
!346
Armem/ltm/dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/armem/server/ltm/Entity.cpp
+34
-33
34 additions, 33 deletions
source/RobotAPI/libraries/armem/server/ltm/Entity.cpp
with
34 additions
and
33 deletions
source/RobotAPI/libraries/armem/server/ltm/Entity.cpp
+
34
−
33
View file @
3cad06fc
...
...
@@ -58,7 +58,8 @@ namespace armarx::armem::server::ltm
for
(
const
auto
&
d
:
getAllDirectories
())
// days
{
if
(
!
util
::
fs
::
detail
::
isDateString
(
d
.
filename
()))
if
(
!
util
::
fs
::
detail
::
isDateString
(
d
.
filename
())
and
!
util
::
fs
::
detail
::
isNumberString
(
d
.
filename
()))
{
ARMARX_WARNING
<<
"Found a non-date folder inside an entity '"
<<
id
().
str
()
<<
"' with name '"
<<
d
.
filename
()
<<
"'. "
...
...
@@ -477,46 +478,46 @@ namespace armarx::armem::server::ltm
void
Entity
::
_storeWithoutFiltering
(
const
armem
::
wm
::
Entity
&
c
)
{
std
::
lock_guard
l
(
ltm_mutex
);
if
(
id
().
entityName
.
empty
())
{
ARMARX_WARNING
<<
"During storage of segment '"
<<
c
.
id
().
str
()
<<
"' I noticed that the corresponding LTM has no id set. "
<<
"I set the id of the LTM to the same name, however this should not happen!"
;
id
().
entityName
=
c
.
id
().
entityName
;
}
/*if (!connected())
std
::
lock_guard
l
(
ltm_mutex
);
if
(
id
().
entityName
.
empty
())
{
ARMARX_WARNING
<<
"During storage of segment '"
<<
c
.
id
().
str
()
<<
"' I noticed that the corresponding LTM has no id set. "
<<
"I set the id of the LTM to the same name, however this should not happen!"
;
id
().
entityName
=
c
.
id
().
entityName
;
}
/*if (!connected())
{
ARMARX_WARNING << "LTM ENTITY NOT CONNECTED ALTHOUGH ENABLED " << id().str();
return;
}*/
//writeForeignKeyToPreviousDocument();
//writeForeignKeyToPreviousDocument();
c
.
forEachSnapshot
(
[
&
](
const
auto
&
snap
)
{
EntitySnapshot
c
(
getMemoryBasePath
(),
getSettings
(),
getExportName
(),
id
().
withTimestamp
(
snap
.
id
().
timestamp
),
processors
);
c
.
forEachSnapshot
(
[
&
](
const
auto
&
snap
)
{
EntitySnapshot
c
(
getMemoryBasePath
(),
getSettings
(),
getExportName
(),
id
().
withTimestamp
(
snap
.
id
().
timestamp
),
processors
);
// check if snapshot already exists
// check if snapshot already exists
if
(
hasSnapshot
(
snap
.
id
().
timestamp
))
{
ARMARX_INFO
<<
deactivateSpam
()
<<
"Ignoring to put an EntitiySnapshot into the LTM because "
"the timestamp already existed (we assume snapshots are "
"const and do not change outside the ltm)."
;
return
;
}
if
(
hasSnapshot
(
snap
.
id
().
timestamp
))
{
ARMARX_INFO
<<
deactivateSpam
()
<<
"Ignoring to put an EntitiySnapshot into the LTM because "
"the timestamp already existed (we assume snapshots are "
"const and do not change outside the ltm)."
;
return
;
}
c
.
store
(
snap
);
statistics
.
recordedSnapshots
++
;
});
c
.
store
(
snap
);
statistics
.
recordedSnapshots
++
;
});
}
}
// namespace armarx::armem::server::ltm
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment