@@ -53,6 +53,10 @@ pub struct EnvVarsMapping {
53
53
///
54
54
/// Set by the environment variable `GRAPH_IPFS_REQUEST_LIMIT`. Defaults to 100.
55
55
pub ipfs_request_limit : u16 ,
56
+ /// Limit of max IPFS attempts to retrieve a file.
57
+ ///
58
+ /// Set by the environment variable `GRAPH_IPFS_MAX_ATTEMPTS`. Defaults to 100000.
59
+ pub ipfs_max_attempts : usize ,
56
60
57
61
/// Set by the flag `GRAPH_ALLOW_NON_DETERMINISTIC_IPFS`. Off by
58
62
/// default.
@@ -94,6 +98,7 @@ impl From<InnerMappingHandlers> for EnvVarsMapping {
94
98
max_ipfs_map_file_size : x. max_ipfs_map_file_size . 0 ,
95
99
max_ipfs_file_bytes : x. max_ipfs_file_bytes . 0 ,
96
100
ipfs_request_limit : x. ipfs_request_limit ,
101
+ ipfs_max_attempts : x. ipfs_max_attempts ,
97
102
allow_non_deterministic_ipfs : x. allow_non_deterministic_ipfs . 0 ,
98
103
disable_declared_calls : x. disable_declared_calls . 0 ,
99
104
store_errors_are_nondeterministic : x. store_errors_are_nondeterministic . 0 ,
@@ -127,6 +132,8 @@ pub struct InnerMappingHandlers {
127
132
max_ipfs_file_bytes : WithDefaultUsize < usize , { 25 * 1024 * 1024 } > ,
128
133
#[ envconfig( from = "GRAPH_IPFS_REQUEST_LIMIT" , default = "100" ) ]
129
134
ipfs_request_limit : u16 ,
135
+ #[ envconfig( from = "GRAPH_IPFS_MAX_ATTEMPTS" , default = "100000" ) ]
136
+ ipfs_max_attempts : usize ,
130
137
#[ envconfig( from = "GRAPH_ALLOW_NON_DETERMINISTIC_IPFS" , default = "false" ) ]
131
138
allow_non_deterministic_ipfs : EnvVarBoolean ,
132
139
#[ envconfig( from = "GRAPH_DISABLE_DECLARED_CALLS" , default = "false" ) ]
0 commit comments