All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci plone-custom/manage_inactive.js sit ...
Date: 24 Mar 2008 23:22:12 -0000	[thread overview]
Message-ID: <20080324232212.8813.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2008-03-24 23:22:11

Modified files:
	luci/plone-custom: manage_inactive.js 
	luci/site/luci/Extensions: LuciZope.py LuciZopeAsync.py 
	luci/site/luci/var: Data.fs 

Log message:
	Forward port fixes from RHEL5

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/manage_inactive.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZope.py.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeAsync.py.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/var/Data.fs.diff?cvsroot=cluster&r1=1.31&r2=1.32

--- conga/luci/plone-custom/manage_inactive.js	2008/02/08 21:47:56	1.1
+++ conga/luci/plone-custom/manage_inactive.js	2008/03/24 23:22:09	1.2
@@ -78,7 +78,7 @@
 	return (initiate_async_get(check_inactive_url, check_inactive_callback));
 }
 
-setInterval("update_last_active()", 1000 * 30);
+setInterval("update_last_active()", 100 * 275);
 setInterval("check_user_inactive()", 1000 * 60);
 window.onmousemove = new Function('activity_event_handler()');
 window.onkeypress = new Function('activity_event_handler()');
--- conga/luci/site/luci/Extensions/LuciZope.py	2008/03/05 23:08:58	1.10
+++ conga/luci/site/luci/Extensions/LuciZope.py	2008/03/24 23:22:09	1.11
@@ -8,7 +8,7 @@
 from LuciZopePerm import userAuthenticated
 from LuciDB import allowed_systems
 from LuciSyslog import get_logger
-from conga_constants import LUCI_DEBUG_MODE
+from conga_constants import LUCI_DEBUG_MODE, INACTIVITY_TIMEOUT_SEC
 
 luci_log = get_logger()
 
@@ -184,10 +184,10 @@
 	from time import time
 	if userAuthenticated(self):
 		request.SESSION.set('last_activity', int(time()))
+		request.SESSION.setTimeoutMinutes(max(INACTIVITY_TIMEOUT_SEC / 60, 10))
 
 def user_check_inactive(self, request):
 	from time import time
-	from conga_constants import INACTIVITY_TIMEOUT_SEC as INACTIVITY_TIMEOUT
 
 	if not userAuthenticated(self):
 		return (False, -1)
@@ -196,11 +196,12 @@
 	old_time = request.SESSION.get('last_activity', None)
 	if old_time is None:
 		request.SESSION.set('last_activity', cur_time)
+		request.SESSION.setTimeoutMinutes(max(INACTIVITY_TIMEOUT_SEC / 60, 10))
 		return (False, -2)
 	old_time = int(old_time)
 
 	time_diff = cur_time - old_time
-	if time_diff >= INACTIVITY_TIMEOUT:
+	if time_diff >= INACTIVITY_TIMEOUT_SEC:
 		return (True, time_diff)
 	return (False, time_diff)
 
--- conga/luci/site/luci/Extensions/LuciZopeAsync.py	2008/02/27 20:09:19	1.9
+++ conga/luci/site/luci/Extensions/LuciZopeAsync.py	2008/03/24 23:22:09	1.10
@@ -172,8 +172,9 @@
 
 def check_inactive_async(self, request):
 	from LuciZope import user_check_inactive
+	from conga_constants import INACTIVITY_TIMEOUT_SEC
 	(inactive, diff) = user_check_inactive(self, request)
-	xml_obj = result_to_xml((True, { 'inactive': inactive, 'diff': diff }))
+	xml_obj = result_to_xml((True, { 'inactive': inactive, 'diff': diff, 'max_inactive': INACTIVITY_TIMEOUT_SEC }))
 	write_xml_resp(request, xml_obj)
 
 def update_inactive_async(self, request):
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/02/08 21:47:56	1.31 and /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/03/24 23:22:09	1.32 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed



                 reply	other threads:[~2008-03-24 23:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080324232212.8813.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.