Skip to content

Commit

Permalink
chore: format logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantios committed Nov 21, 2023
1 parent 9f203b8 commit 98fd842
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/valory/contracts/conditional_tokens/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def check_redeemed(
except (Urllib3ReadTimeoutError, RequestsReadTimeoutError):
msg = (
"The RPC timed out! This usually happens if the filtering is too wide. "
f"The service tried to filter from block {from_block} to {to_block}."
f"The service tried to filter from block {from_block} to {to_block}. "
f"If this issue persists, please try lowering the `EVENT_FILTERING_BATCH_SIZE`!"
)
return dict(error=msg)
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/contracts/realitio/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_claim_params(
except (Urllib3ReadTimeoutError, RequestsReadTimeoutError):
msg = (
"The RPC timed out! This usually happens if the filtering is too wide. "
f"The service tried to filter from block {from_block} to {to_block}."
f"The service tried to filter from block {from_block} to {to_block}. "
f"If this issue persists, please try lowering the `EVENT_FILTERING_BATCH_SIZE`!"
)
return dict(error=msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,9 @@ def _check_already_redeemed(self) -> WaitableConditionType:
n_retries += 1
keep_fraction = (1 - self.params.reduce_factor) ** n_retries
batch_size = int(self.params.event_filtering_batch_size * keep_fraction)
msg = (
self.context.logger.warning(
f"Repeating this call with a decreased batch size of {batch_size}."
)
self.context.logger.warning(msg)
continue

self.redeeming_progress.payouts.update(self.payouts_batch)
Expand Down Expand Up @@ -587,10 +586,9 @@ def get_claim_params(self) -> WaitableConditionType:
n_retries += 1
keep_fraction = (1 - self.params.reduce_factor) ** n_retries
batch_size = int(self.params.event_filtering_batch_size * keep_fraction)
msg = (
self.context.logger.warning(
f"Repeating this call with a decreased batch size of {batch_size}."
)
self.context.logger.warning(msg)
continue

self.redeeming_progress.answered.extend(self.claim_params_batch)
Expand Down

0 comments on commit 98fd842

Please sign in to comment.