svn: use shared configurable storage for svn_txn_id interception logic.

This commit is contained in:
Marcin Kuzminski 2018-09-11 11:31:53 +02:00
parent b79d6e197a
commit da76e0ed96
2 changed files with 10 additions and 4 deletions

View file

@ -190,8 +190,14 @@ class HttpHooksCallbackDaemon(ThreadedHookCallbackDaemon):
def get_txn_id_data_path(txn_id):
root = tempfile.gettempdir()
return os.path.join(root, 'rc_txn_id_{}'.format(txn_id))
import rhodecode
root = rhodecode.CONFIG.get('cache_dir') or tempfile.gettempdir()
final_dir = os.path.join(root, 'svn_txn_id')
if not os.path.isdir(final_dir):
os.makedirs(final_dir)
return os.path.join(final_dir, 'rc_txn_id_{}'.format(txn_id))
def store_txn_id_data(txn_id, data_dict):

View file

@ -74,10 +74,10 @@ class SimpleSvnApp(object):
if response.status_code not in [200, 401]:
if response.status_code >= 500:
log.error('Got SVN response:%s with text:`%s`',
log.error('Got SVN response:%s with text:\n`%s`',
response, response.text)
else:
log.debug('Got SVN response:%s with text:`%s`',
log.debug('Got SVN response:%s with text:\n`%s`',
response, response.text)
else:
log.debug('got response code: %s', response.status_code)