fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ping server every 10 minutes
[redakcja.git]
/
redakcja
/
static
/
js
/
wiki
/
wikiapi.js
diff --git
a/redakcja/static/js/wiki/wikiapi.js
b/redakcja/static/js/wiki/wikiapi.js
index
26732bd
..
13435ea
100644
(file)
--- a/
redakcja/static/js/wiki/wikiapi.js
+++ b/
redakcja/static/js/wiki/wikiapi.js
@@
-44,6
+44,9
@@
if (vname == "ajax_publish")
return base_path + "/" + arguments[1] + "/publish";
if (vname == "ajax_publish")
return base_path + "/" + arguments[1] + "/publish";
+
+ if (vname == 'ping')
+ return base_path + '/ping/'
console.log("Couldn't reverse match:", vname);
return "/404.html";
console.log("Couldn't reverse match:", vname);
return "/404.html";
@@
-320,4
+323,20
@@
};
$.wikiapi.WikiDocument = WikiDocument;
};
$.wikiapi.WikiDocument = WikiDocument;
+
+
+ var ping = function () {
+ $.ajax({
+ url : reverse('ping'),
+ timeout: 2000,
+ complete : function () {
+ setTimeout(function () {
+ ping();
+ }, 600000);
+ }
+ });
+ };
+
+ ping();
+
})(jQuery);
})(jQuery);