Skip to content

Commit 4ef6145

Browse files
committed
fix: update library index refresh interval to 10 minutes for improved performance
1 parent 3d622cf commit 4ef6145

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/orchestrator/sketch_libs.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/arduino/arduino-app-cli/internal/orchestrator/app"
2929
)
3030

31-
const indexUpdateInterval = 60 * time.Second
31+
const indexUpdateInterval = 10 * time.Minute
3232

3333
func AddSketchLibrary(ctx context.Context, app app.ArduinoApp, libRef LibraryReleaseID, addDeps bool) ([]LibraryReleaseID, error) {
3434
srv := commands.NewArduinoCoreServer()
@@ -54,7 +54,6 @@ func AddSketchLibrary(ctx context.Context, app app.ArduinoApp, libRef LibraryRel
5454
})
5555
req := &rpc.UpdateLibrariesIndexRequest{Instance: inst, UpdateIfOlderThanSecs: int64(indexUpdateInterval.Seconds())}
5656
if err := srv.UpdateLibrariesIndex(req, stream); err != nil {
57-
// TODO: only print a warn message instead of failing ? in order to avoid blocking the user to install the lib in case it is present into the local index
5857
return []LibraryReleaseID{}, fmt.Errorf("error updating library index: %v", err)
5958
}
6059
slog.Debug("Library index update", "status", res().GetLibrariesIndex().GetStatus())

0 commit comments

Comments
 (0)