Commit b11efdae authored by Łukasz Nowak's avatar Łukasz Nowak

Finalize tidstorage server part installation by setting up repozo wrapper and

configuring backup cron job.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45835 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 77bbd1ca
No related merge requests found
...@@ -568,6 +568,7 @@ class Recipe(BaseSlapRecipe): ...@@ -568,6 +568,7 @@ class Recipe(BaseSlapRecipe):
pidfile = os.path.join(self.run_directory, 'tidstorage.pid') pidfile = os.path.join(self.run_directory, 'tidstorage.pid')
timestamp_file_path = os.path.join(self.log_directory, timestamp_file_path = os.path.join(self.log_directory,
'repozo_tidstorage_timestamp.log') 'repozo_tidstorage_timestamp.log')
# shared configuration file
tidstorage_config = self.createConfigurationFile('tidstorage.py', tidstorage_config = self.createConfigurationFile('tidstorage.py',
self.substituteTemplate(self.getTemplateFilename('tidstorage.py.in'), self.substituteTemplate(self.getTemplateFilename('tidstorage.py.in'),
dict( dict(
...@@ -580,6 +581,7 @@ class Recipe(BaseSlapRecipe): ...@@ -580,6 +581,7 @@ class Recipe(BaseSlapRecipe):
logfile=logfile, logfile=logfile,
pidfile=pidfile pidfile=pidfile
))) )))
# TID server
tidstorage_server = zc.buildout.easy_install.scripts([('tidstoraged', tidstorage_server = zc.buildout.easy_install.scripts([('tidstoraged',
__name__ + '.execute', 'execute')], self.ws, sys.executable, __name__ + '.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
...@@ -589,7 +591,19 @@ class Recipe(BaseSlapRecipe): ...@@ -589,7 +591,19 @@ class Recipe(BaseSlapRecipe):
self.killpidfromfile + ' ' + pidfile + ' SIGHUP') self.killpidfromfile + ' ' + pidfile + ' SIGHUP')
self.path_list.append(tidstorage_config) self.path_list.append(tidstorage_config)
self.path_list.append(tidstorage_server) self.path_list.append(tidstorage_server)
raise NotImplementedError
# repozo wrapper
tidstorage_repozo = zc.buildout.easy_install.scripts([('tidstorage_repozo',
__name__ + '.execute', 'execute')], self.ws, sys.executable,
self.bin_directory, arguments=[
self.options['tidstorage_repozo_binary'], '--config', tidstorage_config,
'--repozo', self.options['repozo_binary']])[0]
self.path_list.append(tidstorage_repozo)
# and backup configuration
tidstorage_repozo_cron = os.path.join(self.cron_d, 'tidstorage_repozo')
open(tidstorage_repozo_cron, 'w').write('0 0 * * * %s' % tidstorage_repozo)
self.path_list.append(tidstorage_repozo_cron)
def installZope(self, ip, port, name, zodb_configuration_string, def installZope(self, ip, port, name, zodb_configuration_string,
with_timerservice=False): with_timerservice=False):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment