Skip to content

Commit

Permalink
config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Dec 16, 2024
1 parent 07dc376 commit 5c7f937
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions cmd/bigsky/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ func run(args []string) error {
Usage: "forward POST requestCrawl to this url, should be machine root url and not xrpc/requestCrawl, comma separated list",
EnvVars: []string{"RELAY_NEXT_CRAWLER"},
},
&cli.BoolFlag{
Name: "non-archival",
EnvVars: []string{"RELAY_NON_ARCHIVAL"},
Value: false,
},
}

app.Action = runBigsky
Expand Down Expand Up @@ -345,9 +350,22 @@ func runBigsky(cctx *cli.Context) error {
}
}

cstore, err := carstore.NewCarStore(csdb, csdirs)
if err != nil {
return err
var cstore carstore.CarStore

if cctx.Bool("non-archival") {
cs, err := carstore.NewNonArchivalCarstore(csdb)
if err != nil {
return err
}

cstore = cs
} else {
cs, err := carstore.NewCarStore(csdb, csdirs)
if err != nil {
return err
}

cstore = cs
}

// DID RESOLUTION
Expand Down

0 comments on commit 5c7f937

Please sign in to comment.