Commit f1ed5da2 authored by Tatuya Kamada's avatar Tatuya Kamada

Add a parameter to configure the entry point url for web checker.

parent a3af61c5
...@@ -13,6 +13,7 @@ instance = request( ...@@ -13,6 +13,7 @@ instance = request(
software_type='varnish', software_type='varnish',
partition_parameter_kw={ partition_parameter_kw={
'tidstorage-url':'http://[your tidstrage address]:your tid strage port', 'tidstorage-url':'http://[your tidstrage address]:your tid strage port',
'web-checker-frontend-url':'http://www.example.com',
'web-checker-mail-address':'web-checker-result@example.com', 'web-checker-mail-address':'web-checker-result@example.com',
'web-checker-smtp-host':'mail.example.com', 'web-checker-smtp-host':'mail.example.com',
} }
...@@ -21,6 +22,9 @@ instance = request( ...@@ -21,6 +22,9 @@ instance = request(
tidstrage-url is the backend url that varnish will cache. It is expected that tidstrage-url is the backend url that varnish will cache. It is expected that
the backend is created by tidstorage recipe. the backend is created by tidstorage recipe.
web-checker-frontend-url is the entry-point-url that web checker will check
the HTTP headers of all the pages in the web site.
web-checker-mail-address is the email address where web checker will send web-checker-mail-address is the email address where web checker will send
the HTTP Cache cheking result. the HTTP Cache cheking result.
......
...@@ -36,13 +36,17 @@ class Recipe(GenericSlapRecipe): ...@@ -36,13 +36,17 @@ class Recipe(GenericSlapRecipe):
path_list = [] path_list = []
web_checker_mail_address = self.parameter_dict['web-checker-mail-address'] web_checker_mail_address = self.parameter_dict['web-checker-mail-address']
web_checker_smtp_host = self.parameter_dict['web-checker-smtp-host'] web_checker_smtp_host = self.parameter_dict['web-checker-smtp-host']
web_checker_frontend_url = self.parameter_dict.get(
'web-checker-frontend-url')
if web_checker_frontend_url is None:
web_checker_frontend_url = self.options['frontend-url']
web_checker_working_directory = \ web_checker_working_directory = \
self.options['web-checker-working-directory'] self.options['web-checker-working-directory']
config = dict( config = dict(
web_checker_mail_address = web_checker_mail_address, web_checker_mail_address = web_checker_mail_address,
web_checker_smtp_host = web_checker_smtp_host, web_checker_smtp_host = web_checker_smtp_host,
web_checker_working_directory = web_checker_working_directory, web_checker_working_directory = web_checker_working_directory,
frontend_url = self.options['frontend-url'], frontend_url = web_checker_frontend_url,
wget_binary_path = self.options['wget-binary-path'], wget_binary_path = self.options['wget-binary-path'],
varnishlog_binary_path = self.options['varnishlog-binary-path'], varnishlog_binary_path = self.options['varnishlog-binary-path'],
web_checker_log = self.options['web-checker-log'], web_checker_log = self.options['web-checker-log'],
......
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