Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
71b03052
Commit
71b03052
authored
Aug 07, 2023
by
Hamdi Allam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nil in err ch is okay. Otherwise tests catch an error
parent
6fe9bbe8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
indexer.go
indexer/indexer.go
+4
-5
No files found.
indexer/indexer.go
View file @
71b03052
...
@@ -2,7 +2,6 @@ package indexer
...
@@ -2,7 +2,6 @@ package indexer
import
(
import
(
"context"
"context"
"errors"
"fmt"
"fmt"
"sync"
"sync"
...
@@ -91,12 +90,12 @@ func (i *Indexer) Run(ctx context.Context) error {
...
@@ -91,12 +90,12 @@ func (i *Indexer) Run(ctx context.Context) error {
err
:=
start
(
processorCtx
)
err
:=
start
(
processorCtx
)
if
err
!=
nil
{
if
err
!=
nil
{
i
.
log
.
Error
(
"halting indexer on error"
,
"err"
,
err
)
i
.
log
.
Error
(
"halting indexer on error"
,
"err"
,
err
)
cancel
()
cancel
()
errCh
<-
err
}
else
{
errCh
<-
errors
.
New
(
"processor stopped"
)
}
}
// Send a value down regardless if we've received an error or halted
// via cancellation where err == nil
errCh
<-
err
}
}
// Kick off the processors
// Kick off the processors
...
...
Write
Preview
Markdown
is supported
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