From f1de5f8d11b90e98d77918e839d0bb3fac5462fb Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Tue, 09 Jun 2020 21:39:25 +0000
Subject: [PATCH] [map] Add parameter for poll api refresh interval

---
 map.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/map.js b/map.js
index 4eb5861..93fdf11 100644
--- a/map.js
+++ b/map.js
@@ -2,6 +2,7 @@
 
 var api_refresh = 10000; // 10 seconds
 var api_poll_url = 'http://127.0.0.1/sub';
+var api_poll_refresh = 1000;
 
 var geolocation = null;
 var geolocation_set = 0;
@@ -406,7 +407,7 @@
 		).done(function(data) {
 			try {
 				if(this.request.status == 304) {
-					setTimeout(self.fetchDiff.bind(self), 1000);
+					setTimeout(self.fetchDiff.bind(self), api_poll_refresh);
 					return;
 				}
 				self.lastUpdate = this.request.getResponseHeader('Etag');

--
Gitblit v1.9.1