Skip to content

Commit

Permalink
Moves internal nats state to resource dir (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-rash authored Jan 2, 2025
1 parent 6023ad4 commit b16e190
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ltb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 10
steps:
-
name: Checkout code
Expand Down
5 changes: 2 additions & 3 deletions node/internal/actors/internal_nats_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,13 @@ func CreateInternalNatsServer(serverPubKey string, options models.NodeOptions) (
}
ns.creds = creds

err = os.Mkdir(filepath.Join(os.TempDir(), "inex-"+serverPubKey), 0700)
ns.storeDir = filepath.Join(options.ResourceDirectory, "inex-"+serverPubKey)
err = os.Mkdir(ns.storeDir, 0700)
if err != nil && !os.IsExist(err) {
options.Logger.Error("Failed to create store temp directory", slog.Any("error", err))
return nil, err
}

ns.storeDir = filepath.Join(os.TempDir(), "inex-"+serverPubKey)

opts, err := ns.generateConfig()
if err != nil {
options.Logger.Error("Failed to generate NATS server config", slog.Any("error", err))
Expand Down

0 comments on commit b16e190

Please sign in to comment.