Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
148ef195
Commit
148ef195
authored
Oct 09, 2019
by
Alessio Netti
Browse files
Pusher/Collectagent does not abort anymore if Sensor Navigator cannot be loaded
parent
44cf05f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
collectagent/analyticscontroller.cpp
View file @
148ef195
...
...
@@ -62,16 +62,15 @@ bool AnalyticsController::initialize(Configuration& settings, const string& conf
try
{
_navigator
->
setFilter
(
_settings
.
analyticsSettings
.
filter
);
_navigator
->
buildTree
(
_settings
.
analyticsSettings
.
hierarchy
,
&
topics
);
LOG
(
info
)
<<
"Built a sensor hierarchy tree of size "
<<
_navigator
->
getTreeSize
()
<<
" and depth "
<<
_navigator
->
getTreeDepth
()
<<
"."
;
}
catch
(
const
std
::
invalid_argument
&
e
)
{
_navigator
->
clearTree
();
LOG
(
error
)
<<
e
.
what
();
LOG
(
error
)
<<
"Failed to build sensor hierarchy tree!"
;
return
false
;
}
LOG
(
info
)
<<
"Built a sensor hierarchy tree of size "
<<
_navigator
->
getTreeSize
()
<<
" and depth "
<<
_navigator
->
getTreeDepth
()
<<
"."
;
topics
.
clear
();
// Assigning the newly-built sensor navigator to the QueryEngine
// Assigning the newly-built sensor navigator to the QueryEngine
(even if uninitialized)
_queryEngine
.
setNavigator
(
_navigator
);
}
...
...
dcdbpusher/dcdbpusher.cpp
View file @
148ef195
...
...
@@ -273,12 +273,12 @@ int main(int argc, char** argv) {
navigator
->
buildTree
(
analyticsSettings
.
hierarchy
,
&
topics
);
topics
.
clear
();
LOG
(
info
)
<<
"Built a sensor hierarchy tree of size "
<<
navigator
->
getTreeSize
()
<<
" and depth "
<<
navigator
->
getTreeDepth
()
<<
"."
;
_queryEngine
.
setNavigator
(
navigator
);
}
catch
(
const
std
::
invalid_argument
&
e
)
{
navigator
->
clearTree
();
LOG
(
error
)
<<
e
.
what
();
LOG
(
error
)
<<
"Failed to build sensor hierarchy tree!"
;
return
1
;
}
_queryEngine
.
setNavigator
(
navigator
);
}
_queryEngine
.
setFilter
(
analyticsSettings
.
filter
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment