Skip to content

Commit

Permalink
Hotfix backfill indexer db leaks (#4371)
Browse files Browse the repository at this point in the history
* Hotfix backfill indexer db leaks

* lint
  • Loading branch information
dharit-tan committed Nov 16, 2022
1 parent 9bcbd0d commit 721cb89
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
18 changes: 10 additions & 8 deletions discovery-provider/src/tasks/index_rewards_manager_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,15 +760,17 @@ def index_rewards_manager_backfill(self):
else:
stop_sig = stop_sig[0]

if not stop_sig:
logger.info(
f"index_rewards_manager_backfill.py | No stop_sig found: {stop_sig}"
)
return
if not stop_sig:
logger.info(
f"index_rewards_manager_backfill.py | No stop_sig found: {stop_sig}"
)
return

if check_if_backfilling_complete(session, solana_client_manager, redis):
logger.info("index_rewards_manager_backfill.py | Backfill indexing complete!")
return
if check_if_backfilling_complete(session, solana_client_manager, redis):
logger.info(
"index_rewards_manager_backfill.py | Backfill indexing complete!"
)
return

try:
# Attempt to acquire lock - do not block if unable to acquire
Expand Down
14 changes: 8 additions & 6 deletions discovery-provider/src/tasks/index_spl_token_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,13 +652,15 @@ def index_spl_token_backfill(self):
else:
stop_sig = stop_sig[0]

if not stop_sig:
logger.info(f"index_spl_token_backfill.py | Error with stop_sig: {stop_sig}")
return
if not stop_sig:
logger.info(
f"index_spl_token_backfill.py | Error with stop_sig: {stop_sig}"
)
return

if check_if_backfilling_complete(session, solana_client_manager, redis):
logger.info("index_spl_token_backfill.py | Backfill indexing complete!")
return
if check_if_backfilling_complete(session, solana_client_manager, redis):
logger.info("index_spl_token_backfill.py | Backfill indexing complete!")
return

try:
# Attempt to acquire lock - do not block if unable to acquire
Expand Down
12 changes: 6 additions & 6 deletions discovery-provider/src/tasks/index_user_bank_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,13 @@ def index_user_bank_backfill(self):
else:
stop_sig = stop_sig[0]

if not stop_sig:
logger.info(f"index_user_bank_backfill.py | No stop_sig found: {stop_sig}")
return
if not stop_sig:
logger.info(f"index_user_bank_backfill.py | No stop_sig found: {stop_sig}")
return

if check_if_backfilling_complete(session, solana_client_manager, redis):
logger.info("index_user_bank_backfill.py | Backfill indexing complete!")
return
if check_if_backfilling_complete(session, solana_client_manager, redis):
logger.info("index_user_bank_backfill.py | Backfill indexing complete!")
return

try:
# Attempt to acquire lock - do not block if unable to acquire
Expand Down

0 comments on commit 721cb89

Please sign in to comment.