Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29338153: Issue 3780 - wait for the loading of filters and only afterwards start to fetch pages (Closed)

Created:
March 11, 2016, 3:55 p.m. by sergei
Modified:
March 15, 2016, 7:25 p.m.
Reviewers:
Wladimir Palant
Visibility:
Public.

Description

# abpcrawler project The code also assumes that after loading of filters there is at least one subscription.

Patch Set 1 #

Total comments: 16

Patch Set 2 : address comments #

Total comments: 6

Patch Set 3 : move .catch() on the same line with .then() #

Patch Set 4 : make crawl_urls function #

Patch Set 5 : remove empty line #

Patch Set 6 : don't use internal FilterStorage._loading #

Total comments: 4

Patch Set 7 : remove onFiltersLoaded listener and fit 80 chars #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -3 lines) Patch
M lib/crawler.js View 1 2 3 4 5 6 3 chunks +46 lines, -3 lines 0 comments Download

Messages

Total messages: 9
sergei
March 11, 2016, 4:02 p.m. (2016-03-11 16:02:18 UTC) #1
Wladimir Palant
https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js#newcode224 lib/crawler.js:224: new Promise(function(resolve, reject) Nit: Why not use arrow functions ...
March 15, 2016, 9:13 a.m. (2016-03-15 09:13:11 UTC) #2
Wladimir Palant
https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js#newcode226 lib/crawler.js:226: if (FilterStorage.subscriptions.length > 0 && !FilterStorage._loading) On 2016/03/15 09:13:10, ...
March 15, 2016, 9:18 a.m. (2016-03-15 09:18:12 UTC) #3
sergei
https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js#newcode224 lib/crawler.js:224: new Promise(function(resolve, reject) On 2016/03/15 09:13:10, Wladimir Palant wrote: ...
March 15, 2016, 12:16 p.m. (2016-03-15 12:16:24 UTC) #4
Wladimir Palant
https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js#newcode224 lib/crawler.js:224: new Promise(function(resolve, reject) On 2016/03/15 12:16:23, sergei wrote: > ...
March 15, 2016, 1:44 p.m. (2016-03-15 13:44:22 UTC) #5
sergei
https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338154/lib/crawler.js#newcode226 lib/crawler.js:226: if (FilterStorage.subscriptions.length > 0 && !FilterStorage._loading) On 2016/03/15 13:44:22, ...
March 15, 2016, 2:44 p.m. (2016-03-15 14:44:25 UTC) #6
Wladimir Palant
https://codereview.adblockplus.org/29338153/diff/29338339/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338339/lib/crawler.js#newcode219 lib/crawler.js:219: FilterNotifier.addListener((action, item, newValue, oldValue) => Just realized: you have ...
March 15, 2016, 2:50 p.m. (2016-03-15 14:50:58 UTC) #7
sergei
https://codereview.adblockplus.org/29338153/diff/29338339/lib/crawler.js File lib/crawler.js (right): https://codereview.adblockplus.org/29338153/diff/29338339/lib/crawler.js#newcode219 lib/crawler.js:219: FilterNotifier.addListener((action, item, newValue, oldValue) => On 2016/03/15 14:50:58, Wladimir ...
March 15, 2016, 2:58 p.m. (2016-03-15 14:58:45 UTC) #8
Wladimir Palant
March 15, 2016, 5:14 p.m. (2016-03-15 17:14:16 UTC) #9
LGTM

Powered by Google App Engine
This is Rietveld