Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Bobrikov committed Nov 9, 2023
1 parent 16801ea commit f312f0a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/dipdup/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ async def _retry_request(
retry_count = 0 if env.TEST else self._config.retry_count
retry_count_str = 'inf' if retry_count is sys.maxsize else str(retry_count)

if Metrics.enabled:
Metrics.set_http_errors_in_row(self._url, 0)

while True:
self._logger.debug('HTTP request attempt %s/%s', attempt, retry_count_str)
try:
Expand Down
3 changes: 0 additions & 3 deletions src/dipdup/indexes/evm_subsquid_events/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ def __init__(
self._realtime_node: EvmNodeDatasource | None = None
self._topics: dict[str, dict[str, str]] | None = None

if self._config.expose_metrics:
Metrics.set_sqd_processor_archive_http_errors_in_row(0)

@property
def node_datasources(self) -> tuple[EvmNodeDatasource, ...]:
if self._node_datasources is not None:
Expand Down
2 changes: 1 addition & 1 deletion src/dipdup/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
['url', 'status'],
)
_http_errors_in_row = Histogram(
'sqd_processor_archive_http_errors_in_row',
'dipdup_http_errors_in_row',
"""The number of consecutive failed requests"""
)
_callback_duration = Histogram(
Expand Down

0 comments on commit f312f0a

Please sign in to comment.