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

refactor(syncers): refactor syncers #699

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

luis-herasme
Copy link
Member

Refactor synchronizers:

This PR removes unnecessary inheritance from the synchronizers. Instead of creating multiple synchronizer classes through inheritance, we now use a single base synchronizer class.

Previously, each subclass was only providing a different synchronize function via the constructor, without adding any new methods or behavior. Since the base synchronizer class already takes a name, a cron pattern, and a synchronize function (which runs according to the cron pattern), the subclasses were redundant. This refactor simplifies the code by directly using the base class.

Additionally, this PR fixes a typo: "ocurred" → "occurred".

Copy link

changeset-bot bot commented Jan 30, 2025

⚠️ No Changeset found

Latest commit: 8cce5a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
blobscan-docs ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 6:02am
blobscan-gnosis ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 6:02am
blobscan-holesky ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 6:02am
blobscan-mainnet ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 6:02am
blobscan-sepolia ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 6:02am
blobscan-staging ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 6:02am

@luis-herasme luis-herasme requested a review from xFJA January 30, 2025 04:07
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 95.54455% with 9 lines in your changes missing coverage. Please review.

Project coverage is 88.45%. Comparing base (74ee125) to head (8cce5a7).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/syncers/src/syncers/OverallStatsSyncer.ts 93.58% 5 Missing ⚠️
packages/syncers/src/BaseSyncer.ts 94.44% 2 Missing ⚠️
packages/syncers/src/syncers/DailyStatsSyncer.ts 94.11% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
- Coverage   88.50%   88.45%   -0.06%     
==========================================
  Files         160      160              
  Lines       10919    10841      -78     
  Branches     1199     1189      -10     
==========================================
- Hits         9664     9589      -75     
+ Misses       1255     1252       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant