From: Radek Czajka Date: Tue, 8 Jun 2010 10:21:36 +0000 (+0200) Subject: Revert "ping server every 10 minutes" X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/c16a4ce964e291edc7fd10dcd12a489a17b9f8d6?ds=sidebyside;hp=404bfe407798a8a83fa02dc1742a315400b7c00b Revert "ping server every 10 minutes" This reverts commit 404bfe407798a8a83fa02dc1742a315400b7c00b. --- diff --git a/apps/wiki/urls.py b/apps/wiki/urls.py index e4e0deb3..bfc799f5 100644 --- a/apps/wiki/urls.py +++ b/apps/wiki/urls.py @@ -26,6 +26,4 @@ urlpatterns = patterns('wiki.views', url(r'^(?P[^/]+)$', 'document_detail', name="wiki_details"), - - url(r'^ping/$', 'ping', name='ping'), ) diff --git a/apps/wiki/views.py b/apps/wiki/views.py index c5fd80e3..46f0665f 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -256,7 +256,3 @@ def document_publish(request, name): return JSONResponse({"result": api.publish_book(document)}) except wlapi.APICallException, e: return JSONServerError({"message": str(e)}) - - -def ping(request): - return http.HttpResponse('pong') diff --git a/redakcja/static/js/wiki/wikiapi.js b/redakcja/static/js/wiki/wikiapi.js index 13435ea0..26732bd5 100644 --- a/redakcja/static/js/wiki/wikiapi.js +++ b/redakcja/static/js/wiki/wikiapi.js @@ -44,9 +44,6 @@ 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"; @@ -323,20 +320,4 @@ }; $.wikiapi.WikiDocument = WikiDocument; - - - var ping = function () { - $.ajax({ - url : reverse('ping'), - timeout: 2000, - complete : function () { - setTimeout(function () { - ping(); - }, 600000); - } - }); - }; - - ping(); - })(jQuery);