Skip to content

Commit

Permalink
fix: reset the retries of the subgraphs on cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantios committed Jul 17, 2024
1 parent df703f6 commit 3874409
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,16 @@ def fetch_user_positions(

all_positions.extend(positions)
user_positions_id_gt = positions[-1]["id"]

def clean_up(self) -> None:
"""Clean up the resources."""
markets_subgraphs = tuple(market for market, _ in self.params.creators_iterator)
other_subgraphs = (
"conditional_tokens_subgraph",
"network_subgraph",
"realitio_subgraph",
"trades_subgraph",
)
for subgraph in markets_subgraphs + other_subgraphs:
subgraph_specs = getattr(self.context, subgraph)
subgraph_specs.reset_retries()

0 comments on commit 3874409

Please sign in to comment.