Improve data sync #190

Merged
raucao merged 7 commits from feature/improve_contribution_sync into master 2020-06-02 08:55:37 +00:00
raucao commented 2020-05-31 10:39:36 +00:00 (Migrated from github.com)

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.

This introduces [ember-concurrency](http://ember-concurrency.com/docs/introduction) 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.
galfert (Migrated from github.com) approved these changes 2020-06-01 23:47:37 +00:00
galfert (Migrated from github.com) left a comment

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

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: '',
galfert (Migrated from github.com) commented 2020-06-01 22:29:54 +00:00

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

Since Octane, components don't have a tag like `div` by default anymore. So this is not necessary.
raucao (Migrated from github.com) reviewed 2020-06-02 08:54:57 +00:00
@@ -2,12 +2,10 @@ import Component from '@ember/component';
import { inject as service } from '@ember/service';
export default Component.extend({
tagName: '',
raucao (Migrated from github.com) commented 2020-06-02 08:54:57 +00:00

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

You mean Glimmer components. But this one hasn't been converted yet.
raucao commented 2020-06-02 08:55:59 +00:00 (Migrated from github.com)

@galfert Thanks!

@galfert Thanks!
bumi commented 2020-06-02 09:34:04 +00:00 (Migrated from github.com)

👍

:+1:
Sign in to join this conversation.