aboutsummaryrefslogtreecommitdiff
path: root/utils/fetchqueue.js
diff options
context:
space:
mode:
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