[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.0.5-39-g41fd2fa
X2Go dev team
git-admin at x2go.org
Sun May 19 13:03:22 CEST 2013
The branch, build-main has been updated
via 41fd2fad0c72117701608c83ced9b6e35221e9fd (commit)
from 54b7e70d862107b1d2142c7313b3d06335cace2b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/control | 1 -
x2gobroker/agent.py | 16 +++++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
The diff of changes is:
diff --git a/debian/control b/debian/control
index fbee287..3190f5c 100644
--- a/debian/control
+++ b/debian/control
@@ -152,7 +152,6 @@ Depends:
python-netaddr,
python-webpy (>= 1:0.37),
python-paramiko,
- python-gevent,
Suggests:
apache2 | httpd,
Description: X2Go http(s) based session broker (Python modules)
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index be8df22..037450b 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -32,6 +32,20 @@ import x2gobroker.defaults
from x2gobroker.loggers import logger_broker, logger_error
+class delayed_execution(threading.Thread):
+
+ def __init__(self, agent_func, delay=0, **kwargs):
+ threading.Thread.__init__(self)
+ self.agent_func = agent_func
+ self.delay = delay
+ self.kwargs = kwargs
+ self.start()
+
+ def run(self):
+ time.sleep(self.delay)
+ self.agent_func(**self.kwargs)
+
+
def call_local_broker_agent(username, mode, cmdline_args=[]):
"""\
Launch X2Go Broker Agent locally and process its output.
@@ -209,7 +223,7 @@ def delete_authorized_key(username, pubkey_hash, authorized_keys_file='%h/.x2go/
_hostname = remote_agent['hostname']
if delay_deletion > 0:
- gevent.spawn_later(delay_deletion, delete_authorized_key, username=username, authorized_keys_file=authorized_keys_file, query_mode=query_mode, remote_agent=remote_agent, )
+ delayed_execution(delete_authorized_key, delay=60, username=username, authorized_keys_file=authorized_keys_file, query_mode=query_mode, remote_agent=remote_agent, )
logger_broker.debug('Scheduled deletion of authorized key in {delay}: user={user}, host={host}'.format(delay=delay_deletion, user=username, host=_hostname))
else:
if query_mode.upper() == u'LOCAL':
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list