Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project Juggler
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
21
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
Project Juggler
Merge requests
!487
Better service integration with strict service init ordering
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Better service integration with strict service init ordering
better-ServiceSvc-interface
into
main
Overview
0
Commits
6
Pipelines
0
Changes
5
Merged
Sylvester Joosten
requested to merge
better-ServiceSvc-interface
into
main
2 years ago
Overview
0
Commits
6
Pipelines
0
Changes
1
Expand
👍
0
👎
0
Merge request reports
Viewing commit
4d2dd0b1
Prev
Next
Show latest version
1 file
+
6
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
4d2dd0b1
Add debug code and only validate services on the main stack
· 4d2dd0b1
Sylvester Joosten
authored
2 years ago
external/algorithms/core/include/algorithms/service.h
+
6
−
2
Options
@@ -80,8 +80,11 @@ public:
void
init
()
{
// Call init for all the services and mark as ready
for
(
const
auto
&
name
:
m_keys
)
{
std
::
cout
<<
"DBGDBG - Initializing "
<<
name
<<
std
::
endl
;
// cannot initialize services with missing properties
if
(
m_services
[
name
]
->
missingProperties
().
size
()
>
0
)
{
std
::
cout
<<
"DBGDBG - Encountered missing properties for "
<<
name
<<
" bailing on init"
<<
std
::
endl
;
break
;
}
m_initializers
[
name
]();
@@ -101,8 +104,9 @@ public:
void
validate
()
const
{
std
::
map
<
std
::
string_view
,
std
::
vector
<
std
::
string_view
>>
missing_props
;
std
::
vector
<
std
::
string_view
>
not_initialized
;
for
(
const
auto
&
[
name
,
svc
]
:
m_services
)
{
auto
missing
=
svc
->
missingProperties
();
for
(
std
::
string_view
name
:
m_keys
)
{
const
auto
svc
=
m_services
.
at
(
name
);
auto
missing
=
svc
->
missingProperties
();
if
(
!
missing
.
empty
())
{
missing_props
[
name
]
=
missing
;
}
Loading