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
313fbafd
Commit
313fbafd
authored
Sep 14, 2023
by
Will Cory
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(indexer): remove indexer all command
parent
cabb04cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
38 deletions
+1
-38
Dockerfile
indexer/Dockerfile
+1
-1
cli.go
indexer/cmd/indexer/cli.go
+0
-37
No files found.
indexer/Dockerfile
View file @
313fbafd
...
...
@@ -23,4 +23,4 @@ FROM alpine:3.18
COPY
--from=builder /app/indexer/indexer /usr/local/bin
CMD
["indexer", "
all
", "--config", "/app/indexer/indexer.toml"]
CMD
["indexer", "
index
", "--config", "/app/indexer/indexer.toml"]
indexer/cmd/indexer/cli.go
View file @
313fbafd
package
main
import
(
"sync"
"github.com/ethereum-optimism/optimism/indexer"
"github.com/ethereum-optimism/optimism/indexer/api"
"github.com/ethereum-optimism/optimism/indexer/config"
...
...
@@ -66,35 +64,6 @@ func runApi(ctx *cli.Context) error {
return
api
.
Start
(
ctx
.
Context
)
}
func
runAll
(
ctx
*
cli
.
Context
)
error
{
log
:=
log
.
NewLogger
(
log
.
ReadCLIConfig
(
ctx
))
// Ensure both processes complete before returning.
var
wg
sync
.
WaitGroup
wg
.
Add
(
2
)
go
func
()
{
defer
wg
.
Done
()
err
:=
runApi
(
ctx
)
if
err
!=
nil
{
log
.
Error
(
"api process non-zero exit"
,
"err"
,
err
)
}
}()
go
func
()
{
defer
wg
.
Done
()
err
:=
runIndexer
(
ctx
)
if
err
!=
nil
{
log
.
Error
(
"indexer process non-zero exit"
,
"err"
,
err
)
}
}()
// We purposefully return no error since the indexer and api
// have no inter-dependencies. We simply rely on the logs to
// report a non-zero exit for either process.
wg
.
Wait
()
return
nil
}
func
newCli
(
GitCommit
string
,
GitDate
string
)
*
cli
.
App
{
flags
:=
[]
cli
.
Flag
{
ConfigFlag
}
flags
=
append
(
flags
,
log
.
CLIFlags
(
"INDEXER"
)
...
)
...
...
@@ -115,12 +84,6 @@ func newCli(GitCommit string, GitDate string) *cli.App {
Description
:
"Runs the indexing service"
,
Action
:
runIndexer
,
},
{
Name
:
"all"
,
Flags
:
flags
,
Description
:
"Runs both the api service and the indexing service"
,
Action
:
runAll
,
},
{
Name
:
"version"
,
Description
:
"print version"
,
...
...
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