# HG changeset patch # User Martin Bornhold # Date 2016-10-17 08:25:49 # Node ID 003babb4092e3f569dffdc58d8531e1e0d43621f # Parent 9910c00dafd4b70030967448ad12cdceb54a295a svn-support: Remove commented code. diff --git a/rhodecode/svn_support/subscribers.py b/rhodecode/svn_support/subscribers.py --- a/rhodecode/svn_support/subscribers.py +++ b/rhodecode/svn_support/subscribers.py @@ -107,50 +107,3 @@ class AsyncSubprocessSubscriber(AsyncSub 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)