Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit d659d18

Browse files
authored
fix(providers/raydium): increase raydium provider timeout (#431)
* increase raydium provider timeout * update raydium provider client init * update timeout * update raydium timeout * update raydium params
1 parent fc28d6d commit d659d18

File tree

6 files changed

+4
-22
lines changed

6 files changed

+4
-22
lines changed

config/dydx/oracle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
"name": "raydium_api",
487487
"api": {
488488
"enabled": true,
489-
"timeout": 500000000,
489+
"timeout": 2000000000,
490490
"interval": 500000000,
491491
"reconnectTimeout": 2000000000,
492492
"maxQueries": 10,

config/dydx_research/oracle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494
"name": "raydium_api",
495495
"api": {
496496
"enabled": true,
497-
"timeout": 500000000,
497+
"timeout": 2000000000,
498498
"interval": 500000000,
499499
"reconnectTimeout": 2000000000,
500500
"maxQueries": 10,

config/local/oracle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@
597597
"name": "raydium_api",
598598
"api": {
599599
"enabled": true,
600-
"timeout": 5000000000,
600+
"timeout": 2000000000,
601601
"interval": 500000000,
602602
"reconnectTimeout": 2000000000,
603603
"maxQueries": 10,

providers/apis/defi/raydium/options.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

providers/apis/defi/raydium/price_fetcher.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func NewAPIPriceFetcher(
5555
logger *zap.Logger,
5656
api config.APIConfig,
5757
apiMetrics metrics.APIMetrics,
58-
opts ...Option,
5958
) (*APIPriceFetcher, error) {
6059
if logger == nil {
6160
return nil, fmt.Errorf("logger cannot be nil")
@@ -104,7 +103,6 @@ func NewAPIPriceFetcher(
104103
logger,
105104
api,
106105
client,
107-
opts...,
108106
)
109107
}
110108

@@ -115,7 +113,6 @@ func NewAPIPriceFetcherWithClient(
115113
logger *zap.Logger,
116114
api config.APIConfig,
117115
client SolanaJSONRPCClient,
118-
opts ...Option,
119116
) (*APIPriceFetcher, error) {
120117
if logger == nil {
121118
return nil, fmt.Errorf("logger cannot be nil")
@@ -146,10 +143,6 @@ func NewAPIPriceFetcherWithClient(
146143
logger: logger.With(zap.String("fetcher", Name)),
147144
}
148145

149-
for _, opt := range opts {
150-
opt(pf)
151-
}
152-
153146
return pf, nil
154147
}
155148

providers/apis/defi/raydium/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func SolanaJSONRPCError(err error) error {
9999
var DefaultAPIConfig = config.APIConfig{
100100
Enabled: true,
101101
Name: Name,
102-
Timeout: 500 * time.Millisecond,
102+
Timeout: 2 * time.Second,
103103
Interval: 500 * time.Millisecond,
104104
ReconnectTimeout: 2000 * time.Millisecond,
105105
MaxQueries: 10,

0 commit comments

Comments
 (0)