aboutsummaryrefslogtreecommitdiff
path: root/utils/fetchqueue.js
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-02-22 23:04:36 -0500
committerHolden Rohrer <hr@hrhr.dev>2020-02-22 23:04:36 -0500
commit7f3110ec388bdf6b72579b70a5736f3f53809de4 (patch)
tree0c0d0fbf22f2cede3f2016e61d855b035b2352aa /utils/fetchqueue.js
parent3f124e1abb0979f460c79d95041f1eb23c3b74e8 (diff)
preliminary fetchqueue framework
Diffstat (limited to 'utils/fetchqueue.js')
-rw-r--r--utils/fetchqueue.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/fetchqueue.js b/utils/fetchqueue.js
new file mode 100644
index 0000000..207178e
--- /dev/null
+++ b/utils/fetchqueue.js
@@ -0,0 +1,15 @@
+// Implements an abstraction layer upon tools/schedule.js's .pause
+
+class fetchQueue{
+ constructor(timeoutms){
+ this.set
+ var fetchs = [];
+ }
+ this.addfetch = function(fetch){
+ fetchs.push(fetch);
+ }
+ this.getfetch = function(){
+ return fetchs.splice(0);
+ }
+}
+module.exports = fetchQueue; // Meant to be called as an extension to a socket & tools/schedule class