svn-support: Remove commented code.

This commit is contained in:
Martin Bornhold 2016-10-17 10:25:49 +02:00
parent a6c17ea43b
commit 472f756d3d

View file

@ -107,50 +107,3 @@ class AsyncSubprocessSubscriber(AsyncSubscriber):
except:
log.exception(
'Exception while executing command %s.', cmd)
# class ReloadApacheSubscriber(object):
# """
# Subscriber to pyramids event system. It executes the Apache reload command
# if set in ini-file. The command is executed asynchronously in a separate
# task. This is done to prevent a delay of the function which triggered the
# event in case of a longer running command. If a timeout is passed to the
# constructor the command will be terminated after expiration.
# """
# def __init__(self, settings, timeout=None):
# self.thread = None
# cmd = self.get_command_from_settings(settings)
# if cmd:
# kwargs = {
# 'cmd': cmd,
# 'timeout': timeout,
# }
# self.thread = Thread(target=self.run, kwargs=kwargs)
# def __call__(self, event):
# if self.thread is not None:
# self.thread.start()
# def get_command_from_settings(self, settings):
# cmd = settings[config_keys.reload_command]
# return cmd.split(' ') if cmd else cmd
# def run(self, cmd, timeout=None):
# log.debug('Executing svn proxy reload command %s.', cmd)
# try:
# output = subprocess32.check_output(
# cmd, timeout=timeout, stderr=subprocess32.STDOUT)
# log.debug('Svn proxy reload command finished.')
# if output:
# log.debug('Command output: %s', output)
# except subprocess32.TimeoutExpired as e:
# log.exception('Timeout while executing svn proxy reload command.')
# if e.output:
# log.error('Command output: %s', e.output)
# except subprocess32.CalledProcessError as e:
# log.exception('Error while executing svn proxy reload command.')
# if e.output:
# log.error('Command output: %s', e.output)
# except:
# log.exception(
# 'Exception while executing svn proxy reload command %s.', cmd)