##// END OF EJS Templates
svn-support: Remove commented code.
Martin Bornhold -
r1018:003babb4 default
parent child Browse files
Show More
@@ -107,50 +107,3 b' class AsyncSubprocessSubscriber(AsyncSub'
107 except:
107 except:
108 log.exception(
108 log.exception(
109 'Exception while executing command %s.', cmd)
109 'Exception while executing command %s.', cmd)
110
111
112 # class ReloadApacheSubscriber(object):
113 # """
114 # Subscriber to pyramids event system. It executes the Apache reload command
115 # if set in ini-file. The command is executed asynchronously in a separate
116 # task. This is done to prevent a delay of the function which triggered the
117 # event in case of a longer running command. If a timeout is passed to the
118 # constructor the command will be terminated after expiration.
119 # """
120 # def __init__(self, settings, timeout=None):
121 # self.thread = None
122 # cmd = self.get_command_from_settings(settings)
123 # if cmd:
124 # kwargs = {
125 # 'cmd': cmd,
126 # 'timeout': timeout,
127 # }
128 # self.thread = Thread(target=self.run, kwargs=kwargs)
129
130 # def __call__(self, event):
131 # if self.thread is not None:
132 # self.thread.start()
133
134 # def get_command_from_settings(self, settings):
135 # cmd = settings[config_keys.reload_command]
136 # return cmd.split(' ') if cmd else cmd
137
138 # def run(self, cmd, timeout=None):
139 # log.debug('Executing svn proxy reload command %s.', cmd)
140 # try:
141 # output = subprocess32.check_output(
142 # cmd, timeout=timeout, stderr=subprocess32.STDOUT)
143 # log.debug('Svn proxy reload command finished.')
144 # if output:
145 # log.debug('Command output: %s', output)
146 # except subprocess32.TimeoutExpired as e:
147 # log.exception('Timeout while executing svn proxy reload command.')
148 # if e.output:
149 # log.error('Command output: %s', e.output)
150 # except subprocess32.CalledProcessError as e:
151 # log.exception('Error while executing svn proxy reload command.')
152 # if e.output:
153 # log.error('Command output: %s', e.output)
154 # except:
155 # log.exception(
156 # 'Exception while executing svn proxy reload command %s.', cmd)
General Comments 0
You need to be logged in to leave comments. Login now