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

Improve data sync #190

Merged
merged 7 commits into from
Jun 2, 2020
Merged

Improve data sync #190

merged 7 commits into from
Jun 2, 2020

Conversation

raucao
Copy link
Member

@raucao raucao commented May 31, 2020

This introduces ember-concurrency for managing concurrent tasks, as well as task queues, etc.. The new changes improve the fetching of data in several ways:

  • If data has been loaded from cache, fetch new contributions and update unconfirmed ones (to see if they were vetoed e.g.)
  • Never fetch contributions again if they are confirmed and cached
  • After syncing new and unconfirmed contributions, fetch/cache all missing past contributions

After merging this one, we should soon improve the dashboard further by not showing all contributions in the list by default, and also asking the user before fetching the entire history. When we have UI for that, we can then also show sync progress somewhere.

Throws a linter warning, now that it's not an RSVP promise anymore.
Copy link
Contributor

@galfert galfert left a comment

Choose a reason for hiding this comment

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

Code looks good. Just had some super minor comment.
Tests worked also as promised.
Great work! 👍

@@ -2,12 +2,10 @@ import Component from '@ember/component';
import { inject as service } from '@ember/service';

export default Component.extend({
tagName: '',
Copy link
Contributor

Choose a reason for hiding this comment

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

Since Octane, components don't have a tag like div by default anymore. So this is not necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean Glimmer components. But this one hasn't been converted yet.

@raucao raucao merged commit e047cc4 into master Jun 2, 2020
@raucao raucao deleted the feature/improve_contribution_sync branch June 2, 2020 08:55
@raucao
Copy link
Member Author

raucao commented Jun 2, 2020

@galfert Thanks!

@bumi
Copy link
Contributor

bumi commented Jun 2, 2020

👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants