summaryrefslogtreecommitdiff
path: root/source.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-05-06 14:29:44 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-05-06 14:29:44 +0200
commitd2eb3e07bf77bcb1fa85f1ddd768fffc5bb2a3b4 (patch)
tree249decdde6e98e3bf4690461cee3d0553539c812 /source.js
parentc8d900349a2a518c5fee9610b6a903a2ff546e50 (diff)
downloadbrokentalents-d2eb3e07bf77bcb1fa85f1ddd768fffc5bb2a3b4.tar.gz
brokentalents-d2eb3e07bf77bcb1fa85f1ddd768fffc5bb2a3b4.zip
remove rate limit, do not crash on http 4xx
Diffstat (limited to 'source.js')
-rw-r--r--source.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/source.js b/source.js
index 2d02939..0f4fd28 100644
--- a/source.js
+++ b/source.js
@@ -19,9 +19,10 @@ function doFetchProcessStoreHour(config) {
return (timestamp) => Future.parallel(1, requestsForHour(timestamp))
.map(R.compose(aggregatePayloads, R.unnest))
- .chain(/*R.map(R.chain(Future.after(intervalSleep),*/ saveFPayloads(timestamp))/*))*/
- .chain(Future.after(intervalSleep));
- // TODO sleeps after request; throttling rpm should happen
+ .chainRej((err) => { console.error(err); return Future.of({}); }) // fail silently
+ .chain(saveFPayloads(timestamp));
+ //.chain(Future.after(intervalSleep));
+ // TODO should sleep after request; throttling rpm should happen
// at a higher level though. CPU / IO / AWS requests stall
// as well
}