Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get missing metadata contracts task #58

Merged
merged 7 commits into from
Jan 14, 2025
Merged

Conversation

moisses89
Copy link
Member

Closes #52

@moisses89 moisses89 requested a review from a team as a code owner January 9, 2025 14:09
@moisses89 moisses89 marked this pull request as draft January 9, 2025 14:09
@moisses89 moisses89 changed the title Periodiq missing contracts Add get missing metadata contracts task Jan 9, 2025
@moisses89 moisses89 marked this pull request as ready for review January 9, 2025 16:32
@coveralls
Copy link

coveralls commented Jan 9, 2025

Pull Request Test Coverage Report for Build 12764420527

Details

  • 21 of 23 (91.3%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 93.688%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/workers/tasks.py 11 13 84.62%
Totals Coverage Status
Change from base Build 12747811414: 0.1%
Covered Lines: 846
Relevant Lines: 903

💛 - Coveralls

app/datasources/db/models.py Outdated Show resolved Hide resolved
) -> None:
contract_metadata_service = get_contract_metadata_service()
# Just try the first time, following retries should be scheduled
if await contract_metadata_service.should_attempt_download(
if skip_attemp_download or await contract_metadata_service.should_attempt_download(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicky: contract_metadata_service.should_attempt_download conditional can be in a separate variable. It would be more understandable in the future. The comment only affects the second part of the condition

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because I just want to evaluate the second part of the conditional y the first is True.

app/workers/tasks.py Outdated Show resolved Hide resolved
@moisses89 moisses89 force-pushed the periodiq_missing_contracts branch from e07f147 to dbd7bf9 Compare January 13, 2025 15:04
@moisses89 moisses89 merged commit 2e7b883 into main Jan 14, 2025
5 checks passed
@moisses89 moisses89 deleted the periodiq_missing_contracts branch January 14, 2025 12:43
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add periodic task to retry missing contract metadata
3 participants