Show More
@@ -1,425 +1,432 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | #threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | #threadpool_max_requests = 10 |
|
36 | #threadpool_max_requests = 10 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | #use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | #use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
42 | use = egg:waitress#main |
|
42 | use = egg:waitress#main | |
43 | host = 0.0.0.0 |
|
43 | host = 0.0.0.0 | |
44 | port = 5000 |
|
44 | port = 5000 | |
45 |
|
45 | |||
46 | [filter:proxy-prefix] |
|
46 | [filter:proxy-prefix] | |
47 | # prefix middleware for rc |
|
47 | # prefix middleware for rc | |
48 | use = egg:PasteDeploy#prefix |
|
48 | use = egg:PasteDeploy#prefix | |
49 | prefix = /<your-prefix> |
|
49 | prefix = /<your-prefix> | |
50 |
|
50 | |||
51 | [app:main] |
|
51 | [app:main] | |
52 | use = egg:rhodecode |
|
52 | use = egg:rhodecode | |
53 | #filter-with = proxy-prefix |
|
53 | #filter-with = proxy-prefix | |
54 | full_stack = true |
|
54 | full_stack = true | |
55 | static_files = true |
|
55 | static_files = true | |
56 | # Optional Languages |
|
56 | # Optional Languages | |
57 | # en, fr, ja, pt_BR, zh_CN, zh_TW |
|
57 | # en, fr, ja, pt_BR, zh_CN, zh_TW | |
58 | lang = en |
|
58 | lang = en | |
59 | cache_dir = %(here)s/data |
|
59 | cache_dir = %(here)s/data | |
60 | index_dir = %(here)s/data/index |
|
60 | index_dir = %(here)s/data/index | |
61 | app_instance_uuid = rc-develop |
|
61 | app_instance_uuid = rc-develop | |
62 | cut_off_limit = 256000 |
|
62 | cut_off_limit = 256000 | |
63 | vcs_full_cache = True |
|
63 | vcs_full_cache = True | |
64 | force_https = false |
|
64 | force_https = false | |
65 | commit_parse_limit = 25 |
|
65 | commit_parse_limit = 25 | |
66 | use_gravatar = true |
|
66 | use_gravatar = true | |
67 |
|
67 | |||
|
68 | ## RSS feed options | |||
|
69 | ||||
|
70 | rss_cut_off_limit = 256000 | |||
|
71 | rss_items_per_page = 10 | |||
|
72 | rss_include_diff = false | |||
|
73 | ||||
|
74 | ||||
68 | ## alternative_gravatar_url allows you to use your own avatar server application |
|
75 | ## alternative_gravatar_url allows you to use your own avatar server application | |
69 | ## the following parts of the URL will be replaced |
|
76 | ## the following parts of the URL will be replaced | |
70 | ## {email} user email |
|
77 | ## {email} user email | |
71 | ## {md5email} md5 hash of the user email (like at gravatar.com) |
|
78 | ## {md5email} md5 hash of the user email (like at gravatar.com) | |
72 | ## {size} size of the image that is expected from the server application |
|
79 | ## {size} size of the image that is expected from the server application | |
73 | ## {scheme} http/https from RhodeCode server |
|
80 | ## {scheme} http/https from RhodeCode server | |
74 | ## {netloc} network location from RhodeCode server |
|
81 | ## {netloc} network location from RhodeCode server | |
75 | #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size} |
|
82 | #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size} | |
76 | #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size} |
|
83 | #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size} | |
77 |
|
84 | |||
78 | container_auth_enabled = false |
|
85 | container_auth_enabled = false | |
79 | proxypass_auth_enabled = false |
|
86 | proxypass_auth_enabled = false | |
80 | ## default encoding used to convert from and to unicode |
|
87 | ## default encoding used to convert from and to unicode | |
81 | ## can be also a comma seperated list of encoding in case of mixed encodings |
|
88 | ## can be also a comma seperated list of encoding in case of mixed encodings | |
82 | default_encoding = utf8 |
|
89 | default_encoding = utf8 | |
83 |
|
90 | |||
84 | ## overwrite schema of clone url |
|
91 | ## overwrite schema of clone url | |
85 | ## available vars: |
|
92 | ## available vars: | |
86 | ## scheme - http/https |
|
93 | ## scheme - http/https | |
87 | ## user - current user |
|
94 | ## user - current user | |
88 | ## pass - password |
|
95 | ## pass - password | |
89 | ## netloc - network location |
|
96 | ## netloc - network location | |
90 | ## path - usually repo_name |
|
97 | ## path - usually repo_name | |
91 |
|
98 | |||
92 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
99 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
93 |
|
100 | |||
94 | ## issue tracking mapping for commits messages |
|
101 | ## issue tracking mapping for commits messages | |
95 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
102 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
96 |
|
103 | |||
97 | ## pattern to get the issues from commit messages |
|
104 | ## pattern to get the issues from commit messages | |
98 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
105 | ## default one used here is #<numbers> with a regex passive group for `#` | |
99 | ## {id} will be all groups matched from this pattern |
|
106 | ## {id} will be all groups matched from this pattern | |
100 |
|
107 | |||
101 | issue_pat = (?:\s*#)(\d+) |
|
108 | issue_pat = (?:\s*#)(\d+) | |
102 |
|
109 | |||
103 | ## server url to the issue, each {id} will be replaced with match |
|
110 | ## server url to the issue, each {id} will be replaced with match | |
104 | ## fetched from the regex and {repo} is replaced with full repository name |
|
111 | ## fetched from the regex and {repo} is replaced with full repository name | |
105 | ## including groups {repo_name} is replaced with just name of repo |
|
112 | ## including groups {repo_name} is replaced with just name of repo | |
106 |
|
113 | |||
107 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
114 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
108 |
|
115 | |||
109 | ## prefix to add to link to indicate it's an url |
|
116 | ## prefix to add to link to indicate it's an url | |
110 | ## #314 will be replaced by <issue_prefix><id> |
|
117 | ## #314 will be replaced by <issue_prefix><id> | |
111 |
|
118 | |||
112 | issue_prefix = # |
|
119 | issue_prefix = # | |
113 |
|
120 | |||
114 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify |
|
121 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify | |
115 | ## multiple patterns, to other issues server, wiki or others |
|
122 | ## multiple patterns, to other issues server, wiki or others | |
116 | ## below an example how to create a wiki pattern |
|
123 | ## below an example how to create a wiki pattern | |
117 | # #wiki-some-id -> https://mywiki.com/some-id |
|
124 | # #wiki-some-id -> https://mywiki.com/some-id | |
118 |
|
125 | |||
119 | #issue_pat_wiki = (?:wiki-)(.+) |
|
126 | #issue_pat_wiki = (?:wiki-)(.+) | |
120 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
127 | #issue_server_link_wiki = https://mywiki.com/{id} | |
121 | #issue_prefix_wiki = WIKI- |
|
128 | #issue_prefix_wiki = WIKI- | |
122 |
|
129 | |||
123 |
|
130 | |||
124 | ## instance-id prefix |
|
131 | ## instance-id prefix | |
125 | ## a prefix key for this instance used for cache invalidation when running |
|
132 | ## a prefix key for this instance used for cache invalidation when running | |
126 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
133 | ## multiple instances of rhodecode, make sure it's globally unique for | |
127 | ## all running rhodecode instances. Leave empty if you don't use it |
|
134 | ## all running rhodecode instances. Leave empty if you don't use it | |
128 | instance_id = |
|
135 | instance_id = | |
129 |
|
136 | |||
130 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
137 | ## alternative return HTTP header for failed authentication. Default HTTP | |
131 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
138 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
132 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
139 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
133 | auth_ret_code = |
|
140 | auth_ret_code = | |
134 |
|
141 | |||
135 | #################################### |
|
142 | #################################### | |
136 | ### CELERY CONFIG #### |
|
143 | ### CELERY CONFIG #### | |
137 | #################################### |
|
144 | #################################### | |
138 | use_celery = false |
|
145 | use_celery = false | |
139 | broker.host = localhost |
|
146 | broker.host = localhost | |
140 | broker.vhost = rabbitmqhost |
|
147 | broker.vhost = rabbitmqhost | |
141 | broker.port = 5672 |
|
148 | broker.port = 5672 | |
142 | broker.user = rabbitmq |
|
149 | broker.user = rabbitmq | |
143 | broker.password = qweqwe |
|
150 | broker.password = qweqwe | |
144 |
|
151 | |||
145 | celery.imports = rhodecode.lib.celerylib.tasks |
|
152 | celery.imports = rhodecode.lib.celerylib.tasks | |
146 |
|
153 | |||
147 | celery.result.backend = amqp |
|
154 | celery.result.backend = amqp | |
148 | celery.result.dburi = amqp:// |
|
155 | celery.result.dburi = amqp:// | |
149 | celery.result.serialier = json |
|
156 | celery.result.serialier = json | |
150 |
|
157 | |||
151 | #celery.send.task.error.emails = true |
|
158 | #celery.send.task.error.emails = true | |
152 | #celery.amqp.task.result.expires = 18000 |
|
159 | #celery.amqp.task.result.expires = 18000 | |
153 |
|
160 | |||
154 | celeryd.concurrency = 2 |
|
161 | celeryd.concurrency = 2 | |
155 | #celeryd.log.file = celeryd.log |
|
162 | #celeryd.log.file = celeryd.log | |
156 | celeryd.log.level = debug |
|
163 | celeryd.log.level = debug | |
157 | celeryd.max.tasks.per.child = 1 |
|
164 | celeryd.max.tasks.per.child = 1 | |
158 |
|
165 | |||
159 | #tasks will never be sent to the queue, but executed locally instead. |
|
166 | #tasks will never be sent to the queue, but executed locally instead. | |
160 | celery.always.eager = false |
|
167 | celery.always.eager = false | |
161 |
|
168 | |||
162 | #################################### |
|
169 | #################################### | |
163 | ### BEAKER CACHE #### |
|
170 | ### BEAKER CACHE #### | |
164 | #################################### |
|
171 | #################################### | |
165 | beaker.cache.data_dir=%(here)s/data/cache/data |
|
172 | beaker.cache.data_dir=%(here)s/data/cache/data | |
166 | beaker.cache.lock_dir=%(here)s/data/cache/lock |
|
173 | beaker.cache.lock_dir=%(here)s/data/cache/lock | |
167 |
|
174 | |||
168 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
175 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
169 |
|
176 | |||
170 | beaker.cache.super_short_term.type=memory |
|
177 | beaker.cache.super_short_term.type=memory | |
171 | beaker.cache.super_short_term.expire=10 |
|
178 | beaker.cache.super_short_term.expire=10 | |
172 | beaker.cache.super_short_term.key_length = 256 |
|
179 | beaker.cache.super_short_term.key_length = 256 | |
173 |
|
180 | |||
174 | beaker.cache.short_term.type=memory |
|
181 | beaker.cache.short_term.type=memory | |
175 | beaker.cache.short_term.expire=60 |
|
182 | beaker.cache.short_term.expire=60 | |
176 | beaker.cache.short_term.key_length = 256 |
|
183 | beaker.cache.short_term.key_length = 256 | |
177 |
|
184 | |||
178 | beaker.cache.long_term.type=memory |
|
185 | beaker.cache.long_term.type=memory | |
179 | beaker.cache.long_term.expire=36000 |
|
186 | beaker.cache.long_term.expire=36000 | |
180 | beaker.cache.long_term.key_length = 256 |
|
187 | beaker.cache.long_term.key_length = 256 | |
181 |
|
188 | |||
182 | beaker.cache.sql_cache_short.type=memory |
|
189 | beaker.cache.sql_cache_short.type=memory | |
183 | beaker.cache.sql_cache_short.expire=10 |
|
190 | beaker.cache.sql_cache_short.expire=10 | |
184 | beaker.cache.sql_cache_short.key_length = 256 |
|
191 | beaker.cache.sql_cache_short.key_length = 256 | |
185 |
|
192 | |||
186 | beaker.cache.sql_cache_med.type=memory |
|
193 | beaker.cache.sql_cache_med.type=memory | |
187 | beaker.cache.sql_cache_med.expire=360 |
|
194 | beaker.cache.sql_cache_med.expire=360 | |
188 | beaker.cache.sql_cache_med.key_length = 256 |
|
195 | beaker.cache.sql_cache_med.key_length = 256 | |
189 |
|
196 | |||
190 | beaker.cache.sql_cache_long.type=file |
|
197 | beaker.cache.sql_cache_long.type=file | |
191 | beaker.cache.sql_cache_long.expire=3600 |
|
198 | beaker.cache.sql_cache_long.expire=3600 | |
192 | beaker.cache.sql_cache_long.key_length = 256 |
|
199 | beaker.cache.sql_cache_long.key_length = 256 | |
193 |
|
200 | |||
194 | #################################### |
|
201 | #################################### | |
195 | ### BEAKER SESSION #### |
|
202 | ### BEAKER SESSION #### | |
196 | #################################### |
|
203 | #################################### | |
197 | ## Type of storage used for the session, current types are |
|
204 | ## Type of storage used for the session, current types are | |
198 | ## dbm, file, memcached, database, and memory. |
|
205 | ## dbm, file, memcached, database, and memory. | |
199 | ## The storage uses the Container API |
|
206 | ## The storage uses the Container API | |
200 | ## that is also used by the cache system. |
|
207 | ## that is also used by the cache system. | |
201 |
|
208 | |||
202 | ## db session ## |
|
209 | ## db session ## | |
203 | #beaker.session.type = ext:database |
|
210 | #beaker.session.type = ext:database | |
204 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
211 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
205 | #beaker.session.table_name = db_session |
|
212 | #beaker.session.table_name = db_session | |
206 |
|
213 | |||
207 | ## encrypted cookie client side session, good for many instances ## |
|
214 | ## encrypted cookie client side session, good for many instances ## | |
208 | #beaker.session.type = cookie |
|
215 | #beaker.session.type = cookie | |
209 |
|
216 | |||
210 | ## file based cookies (default) ## |
|
217 | ## file based cookies (default) ## | |
211 | #beaker.session.type = file |
|
218 | #beaker.session.type = file | |
212 |
|
219 | |||
213 |
|
220 | |||
214 | beaker.session.key = rhodecode |
|
221 | beaker.session.key = rhodecode | |
215 | ## secure cookie requires AES python libraries ## |
|
222 | ## secure cookie requires AES python libraries ## | |
216 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu |
|
223 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu | |
217 | #beaker.session.validate_key = 9712sds2212c--zxc123 |
|
224 | #beaker.session.validate_key = 9712sds2212c--zxc123 | |
218 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
225 | ## sets session as invalid if it haven't been accessed for given amount of time | |
219 | beaker.session.timeout = 2592000 |
|
226 | beaker.session.timeout = 2592000 | |
220 | beaker.session.httponly = true |
|
227 | beaker.session.httponly = true | |
221 | #beaker.session.cookie_path = /<your-prefix> |
|
228 | #beaker.session.cookie_path = /<your-prefix> | |
222 |
|
229 | |||
223 | ## uncomment for https secure cookie ## |
|
230 | ## uncomment for https secure cookie ## | |
224 | beaker.session.secure = false |
|
231 | beaker.session.secure = false | |
225 |
|
232 | |||
226 | ## auto save the session to not to use .save() ## |
|
233 | ## auto save the session to not to use .save() ## | |
227 | beaker.session.auto = False |
|
234 | beaker.session.auto = False | |
228 |
|
235 | |||
229 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
236 | ## default cookie expiration time in seconds `true` expire at browser close ## | |
230 | #beaker.session.cookie_expires = 3600 |
|
237 | #beaker.session.cookie_expires = 3600 | |
231 |
|
238 | |||
232 |
|
239 | |||
233 | ############################ |
|
240 | ############################ | |
234 | ## ERROR HANDLING SYSTEMS ## |
|
241 | ## ERROR HANDLING SYSTEMS ## | |
235 | ############################ |
|
242 | ############################ | |
236 |
|
243 | |||
237 | #################### |
|
244 | #################### | |
238 | ### [errormator] ### |
|
245 | ### [errormator] ### | |
239 | #################### |
|
246 | #################### | |
240 |
|
247 | |||
241 | # Errormator is tailored to work with RhodeCode, see |
|
248 | # Errormator is tailored to work with RhodeCode, see | |
242 | # http://errormator.com for details how to obtain an account |
|
249 | # http://errormator.com for details how to obtain an account | |
243 | # you must install python package `errormator_client` to make it work |
|
250 | # you must install python package `errormator_client` to make it work | |
244 |
|
251 | |||
245 | # errormator enabled |
|
252 | # errormator enabled | |
246 | errormator = true |
|
253 | errormator = true | |
247 |
|
254 | |||
248 | errormator.server_url = https://api.errormator.com |
|
255 | errormator.server_url = https://api.errormator.com | |
249 | errormator.api_key = YOUR_API_KEY |
|
256 | errormator.api_key = YOUR_API_KEY | |
250 |
|
257 | |||
251 | # TWEAK AMOUNT OF INFO SENT HERE |
|
258 | # TWEAK AMOUNT OF INFO SENT HERE | |
252 |
|
259 | |||
253 | # enables 404 error logging (default False) |
|
260 | # enables 404 error logging (default False) | |
254 | errormator.report_404 = false |
|
261 | errormator.report_404 = false | |
255 |
|
262 | |||
256 | # time in seconds after request is considered being slow (default 1) |
|
263 | # time in seconds after request is considered being slow (default 1) | |
257 | errormator.slow_request_time = 1 |
|
264 | errormator.slow_request_time = 1 | |
258 |
|
265 | |||
259 | # record slow requests in application |
|
266 | # record slow requests in application | |
260 | # (needs to be enabled for slow datastore recording and time tracking) |
|
267 | # (needs to be enabled for slow datastore recording and time tracking) | |
261 | errormator.slow_requests = true |
|
268 | errormator.slow_requests = true | |
262 |
|
269 | |||
263 | # enable hooking to application loggers |
|
270 | # enable hooking to application loggers | |
264 | # errormator.logging = true |
|
271 | # errormator.logging = true | |
265 |
|
272 | |||
266 | # minimum log level for log capture |
|
273 | # minimum log level for log capture | |
267 | # errormator.logging.level = WARNING |
|
274 | # errormator.logging.level = WARNING | |
268 |
|
275 | |||
269 | # send logs only from erroneous/slow requests |
|
276 | # send logs only from erroneous/slow requests | |
270 | # (saves API quota for intensive logging) |
|
277 | # (saves API quota for intensive logging) | |
271 | errormator.logging_on_error = false |
|
278 | errormator.logging_on_error = false | |
272 |
|
279 | |||
273 | # list of additonal keywords that should be grabbed from environ object |
|
280 | # list of additonal keywords that should be grabbed from environ object | |
274 | # can be string with comma separated list of words in lowercase |
|
281 | # can be string with comma separated list of words in lowercase | |
275 | # (by default client will always send following info: |
|
282 | # (by default client will always send following info: | |
276 | # 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
283 | # 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that | |
277 | # start with HTTP* this list be extended with additional keywords here |
|
284 | # start with HTTP* this list be extended with additional keywords here | |
278 | errormator.environ_keys_whitelist = |
|
285 | errormator.environ_keys_whitelist = | |
279 |
|
286 | |||
280 |
|
287 | |||
281 | # list of keywords that should be blanked from request object |
|
288 | # list of keywords that should be blanked from request object | |
282 | # can be string with comma separated list of words in lowercase |
|
289 | # can be string with comma separated list of words in lowercase | |
283 | # (by default client will always blank keys that contain following words |
|
290 | # (by default client will always blank keys that contain following words | |
284 | # 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
291 | # 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' | |
285 | # this list be extended with additional keywords set here |
|
292 | # this list be extended with additional keywords set here | |
286 | errormator.request_keys_blacklist = |
|
293 | errormator.request_keys_blacklist = | |
287 |
|
294 | |||
288 |
|
295 | |||
289 | # list of namespaces that should be ignores when gathering log entries |
|
296 | # list of namespaces that should be ignores when gathering log entries | |
290 | # can be string with comma separated list of namespaces |
|
297 | # can be string with comma separated list of namespaces | |
291 | # (by default the client ignores own entries: errormator_client.client) |
|
298 | # (by default the client ignores own entries: errormator_client.client) | |
292 | errormator.log_namespace_blacklist = |
|
299 | errormator.log_namespace_blacklist = | |
293 |
|
300 | |||
294 |
|
301 | |||
295 | ################ |
|
302 | ################ | |
296 | ### [sentry] ### |
|
303 | ### [sentry] ### | |
297 | ################ |
|
304 | ################ | |
298 |
|
305 | |||
299 | # sentry is a alternative open source error aggregator |
|
306 | # sentry is a alternative open source error aggregator | |
300 | # you must install python packages `sentry` and `raven` to enable |
|
307 | # you must install python packages `sentry` and `raven` to enable | |
301 |
|
308 | |||
302 | sentry.dsn = YOUR_DNS |
|
309 | sentry.dsn = YOUR_DNS | |
303 | sentry.servers = |
|
310 | sentry.servers = | |
304 | sentry.name = |
|
311 | sentry.name = | |
305 | sentry.key = |
|
312 | sentry.key = | |
306 | sentry.public_key = |
|
313 | sentry.public_key = | |
307 | sentry.secret_key = |
|
314 | sentry.secret_key = | |
308 | sentry.project = |
|
315 | sentry.project = | |
309 | sentry.site = |
|
316 | sentry.site = | |
310 | sentry.include_paths = |
|
317 | sentry.include_paths = | |
311 | sentry.exclude_paths = |
|
318 | sentry.exclude_paths = | |
312 |
|
319 | |||
313 |
|
320 | |||
314 | ################################################################################ |
|
321 | ################################################################################ | |
315 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
322 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
316 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
323 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
317 | ## execute malicious code after an exception is raised. ## |
|
324 | ## execute malicious code after an exception is raised. ## | |
318 | ################################################################################ |
|
325 | ################################################################################ | |
319 | #set debug = false |
|
326 | #set debug = false | |
320 |
|
327 | |||
321 | ################################## |
|
328 | ################################## | |
322 | ### LOGVIEW CONFIG ### |
|
329 | ### LOGVIEW CONFIG ### | |
323 | ################################## |
|
330 | ################################## | |
324 | logview.sqlalchemy = #faa |
|
331 | logview.sqlalchemy = #faa | |
325 | logview.pylons.templating = #bfb |
|
332 | logview.pylons.templating = #bfb | |
326 | logview.pylons.util = #eee |
|
333 | logview.pylons.util = #eee | |
327 |
|
334 | |||
328 | ######################################################### |
|
335 | ######################################################### | |
329 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
336 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
330 | ######################################################### |
|
337 | ######################################################### | |
331 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
338 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
332 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode |
|
339 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode | |
333 | sqlalchemy.db1.echo = false |
|
340 | sqlalchemy.db1.echo = false | |
334 | sqlalchemy.db1.pool_recycle = 3600 |
|
341 | sqlalchemy.db1.pool_recycle = 3600 | |
335 | sqlalchemy.db1.convert_unicode = true |
|
342 | sqlalchemy.db1.convert_unicode = true | |
336 |
|
343 | |||
337 | ################################ |
|
344 | ################################ | |
338 | ### LOGGING CONFIGURATION #### |
|
345 | ### LOGGING CONFIGURATION #### | |
339 | ################################ |
|
346 | ################################ | |
340 | [loggers] |
|
347 | [loggers] | |
341 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
348 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
342 |
|
349 | |||
343 | [handlers] |
|
350 | [handlers] | |
344 | keys = console, console_sql |
|
351 | keys = console, console_sql | |
345 |
|
352 | |||
346 | [formatters] |
|
353 | [formatters] | |
347 | keys = generic, color_formatter, color_formatter_sql |
|
354 | keys = generic, color_formatter, color_formatter_sql | |
348 |
|
355 | |||
349 | ############# |
|
356 | ############# | |
350 | ## LOGGERS ## |
|
357 | ## LOGGERS ## | |
351 | ############# |
|
358 | ############# | |
352 | [logger_root] |
|
359 | [logger_root] | |
353 | level = NOTSET |
|
360 | level = NOTSET | |
354 | handlers = console |
|
361 | handlers = console | |
355 |
|
362 | |||
356 | [logger_routes] |
|
363 | [logger_routes] | |
357 | level = DEBUG |
|
364 | level = DEBUG | |
358 | handlers = |
|
365 | handlers = | |
359 | qualname = routes.middleware |
|
366 | qualname = routes.middleware | |
360 | # "level = DEBUG" logs the route matched and routing variables. |
|
367 | # "level = DEBUG" logs the route matched and routing variables. | |
361 | propagate = 1 |
|
368 | propagate = 1 | |
362 |
|
369 | |||
363 | [logger_beaker] |
|
370 | [logger_beaker] | |
364 | level = DEBUG |
|
371 | level = DEBUG | |
365 | handlers = |
|
372 | handlers = | |
366 | qualname = beaker.container |
|
373 | qualname = beaker.container | |
367 | propagate = 1 |
|
374 | propagate = 1 | |
368 |
|
375 | |||
369 | [logger_templates] |
|
376 | [logger_templates] | |
370 | level = INFO |
|
377 | level = INFO | |
371 | handlers = |
|
378 | handlers = | |
372 | qualname = pylons.templating |
|
379 | qualname = pylons.templating | |
373 | propagate = 1 |
|
380 | propagate = 1 | |
374 |
|
381 | |||
375 | [logger_rhodecode] |
|
382 | [logger_rhodecode] | |
376 | level = DEBUG |
|
383 | level = DEBUG | |
377 | handlers = |
|
384 | handlers = | |
378 | qualname = rhodecode |
|
385 | qualname = rhodecode | |
379 | propagate = 1 |
|
386 | propagate = 1 | |
380 |
|
387 | |||
381 | [logger_sqlalchemy] |
|
388 | [logger_sqlalchemy] | |
382 | level = INFO |
|
389 | level = INFO | |
383 | handlers = console_sql |
|
390 | handlers = console_sql | |
384 | qualname = sqlalchemy.engine |
|
391 | qualname = sqlalchemy.engine | |
385 | propagate = 0 |
|
392 | propagate = 0 | |
386 |
|
393 | |||
387 | [logger_whoosh_indexer] |
|
394 | [logger_whoosh_indexer] | |
388 | level = DEBUG |
|
395 | level = DEBUG | |
389 | handlers = |
|
396 | handlers = | |
390 | qualname = whoosh_indexer |
|
397 | qualname = whoosh_indexer | |
391 | propagate = 1 |
|
398 | propagate = 1 | |
392 |
|
399 | |||
393 | ############## |
|
400 | ############## | |
394 | ## HANDLERS ## |
|
401 | ## HANDLERS ## | |
395 | ############## |
|
402 | ############## | |
396 |
|
403 | |||
397 | [handler_console] |
|
404 | [handler_console] | |
398 | class = StreamHandler |
|
405 | class = StreamHandler | |
399 | args = (sys.stderr,) |
|
406 | args = (sys.stderr,) | |
400 | level = DEBUG |
|
407 | level = DEBUG | |
401 | formatter = color_formatter |
|
408 | formatter = color_formatter | |
402 |
|
409 | |||
403 | [handler_console_sql] |
|
410 | [handler_console_sql] | |
404 | class = StreamHandler |
|
411 | class = StreamHandler | |
405 | args = (sys.stderr,) |
|
412 | args = (sys.stderr,) | |
406 | level = DEBUG |
|
413 | level = DEBUG | |
407 | formatter = color_formatter_sql |
|
414 | formatter = color_formatter_sql | |
408 |
|
415 | |||
409 | ################ |
|
416 | ################ | |
410 | ## FORMATTERS ## |
|
417 | ## FORMATTERS ## | |
411 | ################ |
|
418 | ################ | |
412 |
|
419 | |||
413 | [formatter_generic] |
|
420 | [formatter_generic] | |
414 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
421 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
415 | datefmt = %Y-%m-%d %H:%M:%S |
|
422 | datefmt = %Y-%m-%d %H:%M:%S | |
416 |
|
423 | |||
417 | [formatter_color_formatter] |
|
424 | [formatter_color_formatter] | |
418 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
425 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
419 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
426 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
420 | datefmt = %Y-%m-%d %H:%M:%S |
|
427 | datefmt = %Y-%m-%d %H:%M:%S | |
421 |
|
428 | |||
422 | [formatter_color_formatter_sql] |
|
429 | [formatter_color_formatter_sql] | |
423 | class=rhodecode.lib.colored_formatter.ColorFormatterSql |
|
430 | class=rhodecode.lib.colored_formatter.ColorFormatterSql | |
424 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
431 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
425 | datefmt = %Y-%m-%d %H:%M:%S |
|
432 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,425 +1,432 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | #threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | #threadpool_max_requests = 10 |
|
36 | #threadpool_max_requests = 10 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | #use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | #use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
42 | use = egg:waitress#main |
|
42 | use = egg:waitress#main | |
43 | host = 127.0.0.1 |
|
43 | host = 127.0.0.1 | |
44 | port = 8001 |
|
44 | port = 8001 | |
45 |
|
45 | |||
46 | [filter:proxy-prefix] |
|
46 | [filter:proxy-prefix] | |
47 | # prefix middleware for rc |
|
47 | # prefix middleware for rc | |
48 | use = egg:PasteDeploy#prefix |
|
48 | use = egg:PasteDeploy#prefix | |
49 | prefix = /<your-prefix> |
|
49 | prefix = /<your-prefix> | |
50 |
|
50 | |||
51 | [app:main] |
|
51 | [app:main] | |
52 | use = egg:rhodecode |
|
52 | use = egg:rhodecode | |
53 | #filter-with = proxy-prefix |
|
53 | #filter-with = proxy-prefix | |
54 | full_stack = true |
|
54 | full_stack = true | |
55 | static_files = true |
|
55 | static_files = true | |
56 | # Optional Languages |
|
56 | # Optional Languages | |
57 | # en, fr, ja, pt_BR, zh_CN, zh_TW |
|
57 | # en, fr, ja, pt_BR, zh_CN, zh_TW | |
58 | lang = en |
|
58 | lang = en | |
59 | cache_dir = %(here)s/data |
|
59 | cache_dir = %(here)s/data | |
60 | index_dir = %(here)s/data/index |
|
60 | index_dir = %(here)s/data/index | |
61 | app_instance_uuid = rc-production |
|
61 | app_instance_uuid = rc-production | |
62 | cut_off_limit = 256000 |
|
62 | cut_off_limit = 256000 | |
63 | vcs_full_cache = True |
|
63 | vcs_full_cache = True | |
64 | force_https = false |
|
64 | force_https = false | |
65 | commit_parse_limit = 50 |
|
65 | commit_parse_limit = 50 | |
66 | use_gravatar = true |
|
66 | use_gravatar = true | |
67 |
|
67 | |||
|
68 | ## RSS feed options | |||
|
69 | ||||
|
70 | rss_cut_off_limit = 256000 | |||
|
71 | rss_items_per_page = 10 | |||
|
72 | rss_include_diff = false | |||
|
73 | ||||
|
74 | ||||
68 | ## alternative_gravatar_url allows you to use your own avatar server application |
|
75 | ## alternative_gravatar_url allows you to use your own avatar server application | |
69 | ## the following parts of the URL will be replaced |
|
76 | ## the following parts of the URL will be replaced | |
70 | ## {email} user email |
|
77 | ## {email} user email | |
71 | ## {md5email} md5 hash of the user email (like at gravatar.com) |
|
78 | ## {md5email} md5 hash of the user email (like at gravatar.com) | |
72 | ## {size} size of the image that is expected from the server application |
|
79 | ## {size} size of the image that is expected from the server application | |
73 | ## {scheme} http/https from RhodeCode server |
|
80 | ## {scheme} http/https from RhodeCode server | |
74 | ## {netloc} network location from RhodeCode server |
|
81 | ## {netloc} network location from RhodeCode server | |
75 | #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size} |
|
82 | #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size} | |
76 | #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size} |
|
83 | #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size} | |
77 |
|
84 | |||
78 | container_auth_enabled = false |
|
85 | container_auth_enabled = false | |
79 | proxypass_auth_enabled = false |
|
86 | proxypass_auth_enabled = false | |
80 | ## default encoding used to convert from and to unicode |
|
87 | ## default encoding used to convert from and to unicode | |
81 | ## can be also a comma seperated list of encoding in case of mixed encodings |
|
88 | ## can be also a comma seperated list of encoding in case of mixed encodings | |
82 | default_encoding = utf8 |
|
89 | default_encoding = utf8 | |
83 |
|
90 | |||
84 | ## overwrite schema of clone url |
|
91 | ## overwrite schema of clone url | |
85 | ## available vars: |
|
92 | ## available vars: | |
86 | ## scheme - http/https |
|
93 | ## scheme - http/https | |
87 | ## user - current user |
|
94 | ## user - current user | |
88 | ## pass - password |
|
95 | ## pass - password | |
89 | ## netloc - network location |
|
96 | ## netloc - network location | |
90 | ## path - usually repo_name |
|
97 | ## path - usually repo_name | |
91 |
|
98 | |||
92 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
99 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
93 |
|
100 | |||
94 | ## issue tracking mapping for commits messages |
|
101 | ## issue tracking mapping for commits messages | |
95 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
102 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
96 |
|
103 | |||
97 | ## pattern to get the issues from commit messages |
|
104 | ## pattern to get the issues from commit messages | |
98 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
105 | ## default one used here is #<numbers> with a regex passive group for `#` | |
99 | ## {id} will be all groups matched from this pattern |
|
106 | ## {id} will be all groups matched from this pattern | |
100 |
|
107 | |||
101 | issue_pat = (?:\s*#)(\d+) |
|
108 | issue_pat = (?:\s*#)(\d+) | |
102 |
|
109 | |||
103 | ## server url to the issue, each {id} will be replaced with match |
|
110 | ## server url to the issue, each {id} will be replaced with match | |
104 | ## fetched from the regex and {repo} is replaced with full repository name |
|
111 | ## fetched from the regex and {repo} is replaced with full repository name | |
105 | ## including groups {repo_name} is replaced with just name of repo |
|
112 | ## including groups {repo_name} is replaced with just name of repo | |
106 |
|
113 | |||
107 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
114 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
108 |
|
115 | |||
109 | ## prefix to add to link to indicate it's an url |
|
116 | ## prefix to add to link to indicate it's an url | |
110 | ## #314 will be replaced by <issue_prefix><id> |
|
117 | ## #314 will be replaced by <issue_prefix><id> | |
111 |
|
118 | |||
112 | issue_prefix = # |
|
119 | issue_prefix = # | |
113 |
|
120 | |||
114 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify |
|
121 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify | |
115 | ## multiple patterns, to other issues server, wiki or others |
|
122 | ## multiple patterns, to other issues server, wiki or others | |
116 | ## below an example how to create a wiki pattern |
|
123 | ## below an example how to create a wiki pattern | |
117 | # #wiki-some-id -> https://mywiki.com/some-id |
|
124 | # #wiki-some-id -> https://mywiki.com/some-id | |
118 |
|
125 | |||
119 | #issue_pat_wiki = (?:wiki-)(.+) |
|
126 | #issue_pat_wiki = (?:wiki-)(.+) | |
120 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
127 | #issue_server_link_wiki = https://mywiki.com/{id} | |
121 | #issue_prefix_wiki = WIKI- |
|
128 | #issue_prefix_wiki = WIKI- | |
122 |
|
129 | |||
123 |
|
130 | |||
124 | ## instance-id prefix |
|
131 | ## instance-id prefix | |
125 | ## a prefix key for this instance used for cache invalidation when running |
|
132 | ## a prefix key for this instance used for cache invalidation when running | |
126 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
133 | ## multiple instances of rhodecode, make sure it's globally unique for | |
127 | ## all running rhodecode instances. Leave empty if you don't use it |
|
134 | ## all running rhodecode instances. Leave empty if you don't use it | |
128 | instance_id = |
|
135 | instance_id = | |
129 |
|
136 | |||
130 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
137 | ## alternative return HTTP header for failed authentication. Default HTTP | |
131 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
138 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
132 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
139 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
133 | auth_ret_code = |
|
140 | auth_ret_code = | |
134 |
|
141 | |||
135 | #################################### |
|
142 | #################################### | |
136 | ### CELERY CONFIG #### |
|
143 | ### CELERY CONFIG #### | |
137 | #################################### |
|
144 | #################################### | |
138 | use_celery = false |
|
145 | use_celery = false | |
139 | broker.host = localhost |
|
146 | broker.host = localhost | |
140 | broker.vhost = rabbitmqhost |
|
147 | broker.vhost = rabbitmqhost | |
141 | broker.port = 5672 |
|
148 | broker.port = 5672 | |
142 | broker.user = rabbitmq |
|
149 | broker.user = rabbitmq | |
143 | broker.password = qweqwe |
|
150 | broker.password = qweqwe | |
144 |
|
151 | |||
145 | celery.imports = rhodecode.lib.celerylib.tasks |
|
152 | celery.imports = rhodecode.lib.celerylib.tasks | |
146 |
|
153 | |||
147 | celery.result.backend = amqp |
|
154 | celery.result.backend = amqp | |
148 | celery.result.dburi = amqp:// |
|
155 | celery.result.dburi = amqp:// | |
149 | celery.result.serialier = json |
|
156 | celery.result.serialier = json | |
150 |
|
157 | |||
151 | #celery.send.task.error.emails = true |
|
158 | #celery.send.task.error.emails = true | |
152 | #celery.amqp.task.result.expires = 18000 |
|
159 | #celery.amqp.task.result.expires = 18000 | |
153 |
|
160 | |||
154 | celeryd.concurrency = 2 |
|
161 | celeryd.concurrency = 2 | |
155 | #celeryd.log.file = celeryd.log |
|
162 | #celeryd.log.file = celeryd.log | |
156 | celeryd.log.level = debug |
|
163 | celeryd.log.level = debug | |
157 | celeryd.max.tasks.per.child = 1 |
|
164 | celeryd.max.tasks.per.child = 1 | |
158 |
|
165 | |||
159 | #tasks will never be sent to the queue, but executed locally instead. |
|
166 | #tasks will never be sent to the queue, but executed locally instead. | |
160 | celery.always.eager = false |
|
167 | celery.always.eager = false | |
161 |
|
168 | |||
162 | #################################### |
|
169 | #################################### | |
163 | ### BEAKER CACHE #### |
|
170 | ### BEAKER CACHE #### | |
164 | #################################### |
|
171 | #################################### | |
165 | beaker.cache.data_dir=%(here)s/data/cache/data |
|
172 | beaker.cache.data_dir=%(here)s/data/cache/data | |
166 | beaker.cache.lock_dir=%(here)s/data/cache/lock |
|
173 | beaker.cache.lock_dir=%(here)s/data/cache/lock | |
167 |
|
174 | |||
168 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
175 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
169 |
|
176 | |||
170 | beaker.cache.super_short_term.type=memory |
|
177 | beaker.cache.super_short_term.type=memory | |
171 | beaker.cache.super_short_term.expire=10 |
|
178 | beaker.cache.super_short_term.expire=10 | |
172 | beaker.cache.super_short_term.key_length = 256 |
|
179 | beaker.cache.super_short_term.key_length = 256 | |
173 |
|
180 | |||
174 | beaker.cache.short_term.type=memory |
|
181 | beaker.cache.short_term.type=memory | |
175 | beaker.cache.short_term.expire=60 |
|
182 | beaker.cache.short_term.expire=60 | |
176 | beaker.cache.short_term.key_length = 256 |
|
183 | beaker.cache.short_term.key_length = 256 | |
177 |
|
184 | |||
178 | beaker.cache.long_term.type=memory |
|
185 | beaker.cache.long_term.type=memory | |
179 | beaker.cache.long_term.expire=36000 |
|
186 | beaker.cache.long_term.expire=36000 | |
180 | beaker.cache.long_term.key_length = 256 |
|
187 | beaker.cache.long_term.key_length = 256 | |
181 |
|
188 | |||
182 | beaker.cache.sql_cache_short.type=memory |
|
189 | beaker.cache.sql_cache_short.type=memory | |
183 | beaker.cache.sql_cache_short.expire=10 |
|
190 | beaker.cache.sql_cache_short.expire=10 | |
184 | beaker.cache.sql_cache_short.key_length = 256 |
|
191 | beaker.cache.sql_cache_short.key_length = 256 | |
185 |
|
192 | |||
186 | beaker.cache.sql_cache_med.type=memory |
|
193 | beaker.cache.sql_cache_med.type=memory | |
187 | beaker.cache.sql_cache_med.expire=360 |
|
194 | beaker.cache.sql_cache_med.expire=360 | |
188 | beaker.cache.sql_cache_med.key_length = 256 |
|
195 | beaker.cache.sql_cache_med.key_length = 256 | |
189 |
|
196 | |||
190 | beaker.cache.sql_cache_long.type=file |
|
197 | beaker.cache.sql_cache_long.type=file | |
191 | beaker.cache.sql_cache_long.expire=3600 |
|
198 | beaker.cache.sql_cache_long.expire=3600 | |
192 | beaker.cache.sql_cache_long.key_length = 256 |
|
199 | beaker.cache.sql_cache_long.key_length = 256 | |
193 |
|
200 | |||
194 | #################################### |
|
201 | #################################### | |
195 | ### BEAKER SESSION #### |
|
202 | ### BEAKER SESSION #### | |
196 | #################################### |
|
203 | #################################### | |
197 | ## Type of storage used for the session, current types are |
|
204 | ## Type of storage used for the session, current types are | |
198 | ## dbm, file, memcached, database, and memory. |
|
205 | ## dbm, file, memcached, database, and memory. | |
199 | ## The storage uses the Container API |
|
206 | ## The storage uses the Container API | |
200 | ## that is also used by the cache system. |
|
207 | ## that is also used by the cache system. | |
201 |
|
208 | |||
202 | ## db session ## |
|
209 | ## db session ## | |
203 | #beaker.session.type = ext:database |
|
210 | #beaker.session.type = ext:database | |
204 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
211 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
205 | #beaker.session.table_name = db_session |
|
212 | #beaker.session.table_name = db_session | |
206 |
|
213 | |||
207 | ## encrypted cookie client side session, good for many instances ## |
|
214 | ## encrypted cookie client side session, good for many instances ## | |
208 | #beaker.session.type = cookie |
|
215 | #beaker.session.type = cookie | |
209 |
|
216 | |||
210 | ## file based cookies (default) ## |
|
217 | ## file based cookies (default) ## | |
211 | #beaker.session.type = file |
|
218 | #beaker.session.type = file | |
212 |
|
219 | |||
213 |
|
220 | |||
214 | beaker.session.key = rhodecode |
|
221 | beaker.session.key = rhodecode | |
215 | ## secure cookie requires AES python libraries ## |
|
222 | ## secure cookie requires AES python libraries ## | |
216 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu |
|
223 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu | |
217 | #beaker.session.validate_key = 9712sds2212c--zxc123 |
|
224 | #beaker.session.validate_key = 9712sds2212c--zxc123 | |
218 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
225 | ## sets session as invalid if it haven't been accessed for given amount of time | |
219 | beaker.session.timeout = 2592000 |
|
226 | beaker.session.timeout = 2592000 | |
220 | beaker.session.httponly = true |
|
227 | beaker.session.httponly = true | |
221 | #beaker.session.cookie_path = /<your-prefix> |
|
228 | #beaker.session.cookie_path = /<your-prefix> | |
222 |
|
229 | |||
223 | ## uncomment for https secure cookie ## |
|
230 | ## uncomment for https secure cookie ## | |
224 | beaker.session.secure = false |
|
231 | beaker.session.secure = false | |
225 |
|
232 | |||
226 | ## auto save the session to not to use .save() ## |
|
233 | ## auto save the session to not to use .save() ## | |
227 | beaker.session.auto = False |
|
234 | beaker.session.auto = False | |
228 |
|
235 | |||
229 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
236 | ## default cookie expiration time in seconds `true` expire at browser close ## | |
230 | #beaker.session.cookie_expires = 3600 |
|
237 | #beaker.session.cookie_expires = 3600 | |
231 |
|
238 | |||
232 |
|
239 | |||
233 | ############################ |
|
240 | ############################ | |
234 | ## ERROR HANDLING SYSTEMS ## |
|
241 | ## ERROR HANDLING SYSTEMS ## | |
235 | ############################ |
|
242 | ############################ | |
236 |
|
243 | |||
237 | #################### |
|
244 | #################### | |
238 | ### [errormator] ### |
|
245 | ### [errormator] ### | |
239 | #################### |
|
246 | #################### | |
240 |
|
247 | |||
241 | # Errormator is tailored to work with RhodeCode, see |
|
248 | # Errormator is tailored to work with RhodeCode, see | |
242 | # http://errormator.com for details how to obtain an account |
|
249 | # http://errormator.com for details how to obtain an account | |
243 | # you must install python package `errormator_client` to make it work |
|
250 | # you must install python package `errormator_client` to make it work | |
244 |
|
251 | |||
245 | # errormator enabled |
|
252 | # errormator enabled | |
246 | errormator = true |
|
253 | errormator = true | |
247 |
|
254 | |||
248 | errormator.server_url = https://api.errormator.com |
|
255 | errormator.server_url = https://api.errormator.com | |
249 | errormator.api_key = YOUR_API_KEY |
|
256 | errormator.api_key = YOUR_API_KEY | |
250 |
|
257 | |||
251 | # TWEAK AMOUNT OF INFO SENT HERE |
|
258 | # TWEAK AMOUNT OF INFO SENT HERE | |
252 |
|
259 | |||
253 | # enables 404 error logging (default False) |
|
260 | # enables 404 error logging (default False) | |
254 | errormator.report_404 = false |
|
261 | errormator.report_404 = false | |
255 |
|
262 | |||
256 | # time in seconds after request is considered being slow (default 1) |
|
263 | # time in seconds after request is considered being slow (default 1) | |
257 | errormator.slow_request_time = 1 |
|
264 | errormator.slow_request_time = 1 | |
258 |
|
265 | |||
259 | # record slow requests in application |
|
266 | # record slow requests in application | |
260 | # (needs to be enabled for slow datastore recording and time tracking) |
|
267 | # (needs to be enabled for slow datastore recording and time tracking) | |
261 | errormator.slow_requests = true |
|
268 | errormator.slow_requests = true | |
262 |
|
269 | |||
263 | # enable hooking to application loggers |
|
270 | # enable hooking to application loggers | |
264 | # errormator.logging = true |
|
271 | # errormator.logging = true | |
265 |
|
272 | |||
266 | # minimum log level for log capture |
|
273 | # minimum log level for log capture | |
267 | # errormator.logging.level = WARNING |
|
274 | # errormator.logging.level = WARNING | |
268 |
|
275 | |||
269 | # send logs only from erroneous/slow requests |
|
276 | # send logs only from erroneous/slow requests | |
270 | # (saves API quota for intensive logging) |
|
277 | # (saves API quota for intensive logging) | |
271 | errormator.logging_on_error = false |
|
278 | errormator.logging_on_error = false | |
272 |
|
279 | |||
273 | # list of additonal keywords that should be grabbed from environ object |
|
280 | # list of additonal keywords that should be grabbed from environ object | |
274 | # can be string with comma separated list of words in lowercase |
|
281 | # can be string with comma separated list of words in lowercase | |
275 | # (by default client will always send following info: |
|
282 | # (by default client will always send following info: | |
276 | # 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
283 | # 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that | |
277 | # start with HTTP* this list be extended with additional keywords here |
|
284 | # start with HTTP* this list be extended with additional keywords here | |
278 | errormator.environ_keys_whitelist = |
|
285 | errormator.environ_keys_whitelist = | |
279 |
|
286 | |||
280 |
|
287 | |||
281 | # list of keywords that should be blanked from request object |
|
288 | # list of keywords that should be blanked from request object | |
282 | # can be string with comma separated list of words in lowercase |
|
289 | # can be string with comma separated list of words in lowercase | |
283 | # (by default client will always blank keys that contain following words |
|
290 | # (by default client will always blank keys that contain following words | |
284 | # 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
291 | # 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' | |
285 | # this list be extended with additional keywords set here |
|
292 | # this list be extended with additional keywords set here | |
286 | errormator.request_keys_blacklist = |
|
293 | errormator.request_keys_blacklist = | |
287 |
|
294 | |||
288 |
|
295 | |||
289 | # list of namespaces that should be ignores when gathering log entries |
|
296 | # list of namespaces that should be ignores when gathering log entries | |
290 | # can be string with comma separated list of namespaces |
|
297 | # can be string with comma separated list of namespaces | |
291 | # (by default the client ignores own entries: errormator_client.client) |
|
298 | # (by default the client ignores own entries: errormator_client.client) | |
292 | errormator.log_namespace_blacklist = |
|
299 | errormator.log_namespace_blacklist = | |
293 |
|
300 | |||
294 |
|
301 | |||
295 | ################ |
|
302 | ################ | |
296 | ### [sentry] ### |
|
303 | ### [sentry] ### | |
297 | ################ |
|
304 | ################ | |
298 |
|
305 | |||
299 | # sentry is a alternative open source error aggregator |
|
306 | # sentry is a alternative open source error aggregator | |
300 | # you must install python packages `sentry` and `raven` to enable |
|
307 | # you must install python packages `sentry` and `raven` to enable | |
301 |
|
308 | |||
302 | sentry.dsn = YOUR_DNS |
|
309 | sentry.dsn = YOUR_DNS | |
303 | sentry.servers = |
|
310 | sentry.servers = | |
304 | sentry.name = |
|
311 | sentry.name = | |
305 | sentry.key = |
|
312 | sentry.key = | |
306 | sentry.public_key = |
|
313 | sentry.public_key = | |
307 | sentry.secret_key = |
|
314 | sentry.secret_key = | |
308 | sentry.project = |
|
315 | sentry.project = | |
309 | sentry.site = |
|
316 | sentry.site = | |
310 | sentry.include_paths = |
|
317 | sentry.include_paths = | |
311 | sentry.exclude_paths = |
|
318 | sentry.exclude_paths = | |
312 |
|
319 | |||
313 |
|
320 | |||
314 | ################################################################################ |
|
321 | ################################################################################ | |
315 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
322 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
316 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
323 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
317 | ## execute malicious code after an exception is raised. ## |
|
324 | ## execute malicious code after an exception is raised. ## | |
318 | ################################################################################ |
|
325 | ################################################################################ | |
319 | set debug = false |
|
326 | set debug = false | |
320 |
|
327 | |||
321 | ################################## |
|
328 | ################################## | |
322 | ### LOGVIEW CONFIG ### |
|
329 | ### LOGVIEW CONFIG ### | |
323 | ################################## |
|
330 | ################################## | |
324 | logview.sqlalchemy = #faa |
|
331 | logview.sqlalchemy = #faa | |
325 | logview.pylons.templating = #bfb |
|
332 | logview.pylons.templating = #bfb | |
326 | logview.pylons.util = #eee |
|
333 | logview.pylons.util = #eee | |
327 |
|
334 | |||
328 | ######################################################### |
|
335 | ######################################################### | |
329 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
336 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
330 | ######################################################### |
|
337 | ######################################################### | |
331 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
338 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
332 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode |
|
339 | sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode | |
333 | sqlalchemy.db1.echo = false |
|
340 | sqlalchemy.db1.echo = false | |
334 | sqlalchemy.db1.pool_recycle = 3600 |
|
341 | sqlalchemy.db1.pool_recycle = 3600 | |
335 | sqlalchemy.db1.convert_unicode = true |
|
342 | sqlalchemy.db1.convert_unicode = true | |
336 |
|
343 | |||
337 | ################################ |
|
344 | ################################ | |
338 | ### LOGGING CONFIGURATION #### |
|
345 | ### LOGGING CONFIGURATION #### | |
339 | ################################ |
|
346 | ################################ | |
340 | [loggers] |
|
347 | [loggers] | |
341 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
348 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
342 |
|
349 | |||
343 | [handlers] |
|
350 | [handlers] | |
344 | keys = console, console_sql |
|
351 | keys = console, console_sql | |
345 |
|
352 | |||
346 | [formatters] |
|
353 | [formatters] | |
347 | keys = generic, color_formatter, color_formatter_sql |
|
354 | keys = generic, color_formatter, color_formatter_sql | |
348 |
|
355 | |||
349 | ############# |
|
356 | ############# | |
350 | ## LOGGERS ## |
|
357 | ## LOGGERS ## | |
351 | ############# |
|
358 | ############# | |
352 | [logger_root] |
|
359 | [logger_root] | |
353 | level = NOTSET |
|
360 | level = NOTSET | |
354 | handlers = console |
|
361 | handlers = console | |
355 |
|
362 | |||
356 | [logger_routes] |
|
363 | [logger_routes] | |
357 | level = DEBUG |
|
364 | level = DEBUG | |
358 | handlers = |
|
365 | handlers = | |
359 | qualname = routes.middleware |
|
366 | qualname = routes.middleware | |
360 | # "level = DEBUG" logs the route matched and routing variables. |
|
367 | # "level = DEBUG" logs the route matched and routing variables. | |
361 | propagate = 1 |
|
368 | propagate = 1 | |
362 |
|
369 | |||
363 | [logger_beaker] |
|
370 | [logger_beaker] | |
364 | level = DEBUG |
|
371 | level = DEBUG | |
365 | handlers = |
|
372 | handlers = | |
366 | qualname = beaker.container |
|
373 | qualname = beaker.container | |
367 | propagate = 1 |
|
374 | propagate = 1 | |
368 |
|
375 | |||
369 | [logger_templates] |
|
376 | [logger_templates] | |
370 | level = INFO |
|
377 | level = INFO | |
371 | handlers = |
|
378 | handlers = | |
372 | qualname = pylons.templating |
|
379 | qualname = pylons.templating | |
373 | propagate = 1 |
|
380 | propagate = 1 | |
374 |
|
381 | |||
375 | [logger_rhodecode] |
|
382 | [logger_rhodecode] | |
376 | level = DEBUG |
|
383 | level = DEBUG | |
377 | handlers = |
|
384 | handlers = | |
378 | qualname = rhodecode |
|
385 | qualname = rhodecode | |
379 | propagate = 1 |
|
386 | propagate = 1 | |
380 |
|
387 | |||
381 | [logger_sqlalchemy] |
|
388 | [logger_sqlalchemy] | |
382 | level = INFO |
|
389 | level = INFO | |
383 | handlers = console_sql |
|
390 | handlers = console_sql | |
384 | qualname = sqlalchemy.engine |
|
391 | qualname = sqlalchemy.engine | |
385 | propagate = 0 |
|
392 | propagate = 0 | |
386 |
|
393 | |||
387 | [logger_whoosh_indexer] |
|
394 | [logger_whoosh_indexer] | |
388 | level = DEBUG |
|
395 | level = DEBUG | |
389 | handlers = |
|
396 | handlers = | |
390 | qualname = whoosh_indexer |
|
397 | qualname = whoosh_indexer | |
391 | propagate = 1 |
|
398 | propagate = 1 | |
392 |
|
399 | |||
393 | ############## |
|
400 | ############## | |
394 | ## HANDLERS ## |
|
401 | ## HANDLERS ## | |
395 | ############## |
|
402 | ############## | |
396 |
|
403 | |||
397 | [handler_console] |
|
404 | [handler_console] | |
398 | class = StreamHandler |
|
405 | class = StreamHandler | |
399 | args = (sys.stderr,) |
|
406 | args = (sys.stderr,) | |
400 | level = INFO |
|
407 | level = INFO | |
401 | formatter = generic |
|
408 | formatter = generic | |
402 |
|
409 | |||
403 | [handler_console_sql] |
|
410 | [handler_console_sql] | |
404 | class = StreamHandler |
|
411 | class = StreamHandler | |
405 | args = (sys.stderr,) |
|
412 | args = (sys.stderr,) | |
406 | level = WARN |
|
413 | level = WARN | |
407 | formatter = generic |
|
414 | formatter = generic | |
408 |
|
415 | |||
409 | ################ |
|
416 | ################ | |
410 | ## FORMATTERS ## |
|
417 | ## FORMATTERS ## | |
411 | ################ |
|
418 | ################ | |
412 |
|
419 | |||
413 | [formatter_generic] |
|
420 | [formatter_generic] | |
414 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
421 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
415 | datefmt = %Y-%m-%d %H:%M:%S |
|
422 | datefmt = %Y-%m-%d %H:%M:%S | |
416 |
|
423 | |||
417 | [formatter_color_formatter] |
|
424 | [formatter_color_formatter] | |
418 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
425 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
419 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
426 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
420 | datefmt = %Y-%m-%d %H:%M:%S |
|
427 | datefmt = %Y-%m-%d %H:%M:%S | |
421 |
|
428 | |||
422 | [formatter_color_formatter_sql] |
|
429 | [formatter_color_formatter_sql] | |
423 | class=rhodecode.lib.colored_formatter.ColorFormatterSql |
|
430 | class=rhodecode.lib.colored_formatter.ColorFormatterSql | |
424 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
431 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
425 | datefmt = %Y-%m-%d %H:%M:%S |
|
432 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,435 +1,442 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # RhodeCode - Pylons environment configuration # |
|
3 | # RhodeCode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
7 |
|
7 | |||
8 | [DEFAULT] |
|
8 | [DEFAULT] | |
9 | debug = true |
|
9 | debug = true | |
10 | pdebug = false |
|
10 | pdebug = false | |
11 | ################################################################################ |
|
11 | ################################################################################ | |
12 | ## Uncomment and replace with the address which should receive ## |
|
12 | ## Uncomment and replace with the address which should receive ## | |
13 | ## any error reports after application crash ## |
|
13 | ## any error reports after application crash ## | |
14 | ## Additionally those settings will be used by RhodeCode mailing system ## |
|
14 | ## Additionally those settings will be used by RhodeCode mailing system ## | |
15 | ################################################################################ |
|
15 | ################################################################################ | |
16 | #email_to = admin@localhost |
|
16 | #email_to = admin@localhost | |
17 | #error_email_from = paste_error@localhost |
|
17 | #error_email_from = paste_error@localhost | |
18 | #app_email_from = rhodecode-noreply@localhost |
|
18 | #app_email_from = rhodecode-noreply@localhost | |
19 | #error_message = |
|
19 | #error_message = | |
20 | #email_prefix = [RhodeCode] |
|
20 | #email_prefix = [RhodeCode] | |
21 |
|
21 | |||
22 | #smtp_server = mail.server.com |
|
22 | #smtp_server = mail.server.com | |
23 | #smtp_username = |
|
23 | #smtp_username = | |
24 | #smtp_password = |
|
24 | #smtp_password = | |
25 | #smtp_port = |
|
25 | #smtp_port = | |
26 | #smtp_use_tls = false |
|
26 | #smtp_use_tls = false | |
27 | #smtp_use_ssl = true |
|
27 | #smtp_use_ssl = true | |
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
28 | # Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) | |
29 | #smtp_auth = |
|
29 | #smtp_auth = | |
30 |
|
30 | |||
31 | [server:main] |
|
31 | [server:main] | |
32 | ##nr of threads to spawn |
|
32 | ##nr of threads to spawn | |
33 | #threadpool_workers = 5 |
|
33 | #threadpool_workers = 5 | |
34 |
|
34 | |||
35 | ##max request before thread respawn |
|
35 | ##max request before thread respawn | |
36 | #threadpool_max_requests = 10 |
|
36 | #threadpool_max_requests = 10 | |
37 |
|
37 | |||
38 | ##option to use threads of process |
|
38 | ##option to use threads of process | |
39 | #use_threadpool = true |
|
39 | #use_threadpool = true | |
40 |
|
40 | |||
41 | #use = egg:Paste#http |
|
41 | #use = egg:Paste#http | |
42 | use = egg:waitress#main |
|
42 | use = egg:waitress#main | |
43 | host = 127.0.0.1 |
|
43 | host = 127.0.0.1 | |
44 | port = 5000 |
|
44 | port = 5000 | |
45 |
|
45 | |||
46 | [filter:proxy-prefix] |
|
46 | [filter:proxy-prefix] | |
47 | # prefix middleware for rc |
|
47 | # prefix middleware for rc | |
48 | use = egg:PasteDeploy#prefix |
|
48 | use = egg:PasteDeploy#prefix | |
49 | prefix = /<your-prefix> |
|
49 | prefix = /<your-prefix> | |
50 |
|
50 | |||
51 | [app:main] |
|
51 | [app:main] | |
52 | use = egg:rhodecode |
|
52 | use = egg:rhodecode | |
53 | #filter-with = proxy-prefix |
|
53 | #filter-with = proxy-prefix | |
54 | full_stack = true |
|
54 | full_stack = true | |
55 | static_files = true |
|
55 | static_files = true | |
56 | # Optional Languages |
|
56 | # Optional Languages | |
57 | # en, fr, ja, pt_BR, zh_CN, zh_TW |
|
57 | # en, fr, ja, pt_BR, zh_CN, zh_TW | |
58 | lang = en |
|
58 | lang = en | |
59 | cache_dir = %(here)s/data |
|
59 | cache_dir = %(here)s/data | |
60 | index_dir = %(here)s/data/index |
|
60 | index_dir = %(here)s/data/index | |
61 | app_instance_uuid = ${app_instance_uuid} |
|
61 | app_instance_uuid = ${app_instance_uuid} | |
62 | cut_off_limit = 256000 |
|
62 | cut_off_limit = 256000 | |
63 | vcs_full_cache = True |
|
63 | vcs_full_cache = True | |
64 | force_https = false |
|
64 | force_https = false | |
65 | commit_parse_limit = 50 |
|
65 | commit_parse_limit = 50 | |
66 | use_gravatar = true |
|
66 | use_gravatar = true | |
67 |
|
67 | |||
|
68 | ## RSS feed options | |||
|
69 | ||||
|
70 | rss_cut_off_limit = 256000 | |||
|
71 | rss_items_per_page = 10 | |||
|
72 | rss_include_diff = false | |||
|
73 | ||||
|
74 | ||||
68 | ## alternative_gravatar_url allows you to use your own avatar server application |
|
75 | ## alternative_gravatar_url allows you to use your own avatar server application | |
69 | ## the following parts of the URL will be replaced |
|
76 | ## the following parts of the URL will be replaced | |
70 | ## {email} user email |
|
77 | ## {email} user email | |
71 | ## {md5email} md5 hash of the user email (like at gravatar.com) |
|
78 | ## {md5email} md5 hash of the user email (like at gravatar.com) | |
72 | ## {size} size of the image that is expected from the server application |
|
79 | ## {size} size of the image that is expected from the server application | |
73 | ## {scheme} http/https from RhodeCode server |
|
80 | ## {scheme} http/https from RhodeCode server | |
74 | ## {netloc} network location from RhodeCode server |
|
81 | ## {netloc} network location from RhodeCode server | |
75 | #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size} |
|
82 | #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size} | |
76 | #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size} |
|
83 | #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size} | |
77 |
|
84 | |||
78 | container_auth_enabled = false |
|
85 | container_auth_enabled = false | |
79 | proxypass_auth_enabled = false |
|
86 | proxypass_auth_enabled = false | |
80 | ## default encoding used to convert from and to unicode |
|
87 | ## default encoding used to convert from and to unicode | |
81 | ## can be also a comma seperated list of encoding in case of mixed encodings |
|
88 | ## can be also a comma seperated list of encoding in case of mixed encodings | |
82 | default_encoding = utf8 |
|
89 | default_encoding = utf8 | |
83 |
|
90 | |||
84 | ## overwrite schema of clone url |
|
91 | ## overwrite schema of clone url | |
85 | ## available vars: |
|
92 | ## available vars: | |
86 | ## scheme - http/https |
|
93 | ## scheme - http/https | |
87 | ## user - current user |
|
94 | ## user - current user | |
88 | ## pass - password |
|
95 | ## pass - password | |
89 | ## netloc - network location |
|
96 | ## netloc - network location | |
90 | ## path - usually repo_name |
|
97 | ## path - usually repo_name | |
91 |
|
98 | |||
92 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
99 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
93 |
|
100 | |||
94 | ## issue tracking mapping for commits messages |
|
101 | ## issue tracking mapping for commits messages | |
95 | ## comment out issue_pat, issue_server, issue_prefix to enable |
|
102 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
96 |
|
103 | |||
97 | ## pattern to get the issues from commit messages |
|
104 | ## pattern to get the issues from commit messages | |
98 | ## default one used here is #<numbers> with a regex passive group for `#` |
|
105 | ## default one used here is #<numbers> with a regex passive group for `#` | |
99 | ## {id} will be all groups matched from this pattern |
|
106 | ## {id} will be all groups matched from this pattern | |
100 |
|
107 | |||
101 | issue_pat = (?:\s*#)(\d+) |
|
108 | issue_pat = (?:\s*#)(\d+) | |
102 |
|
109 | |||
103 | ## server url to the issue, each {id} will be replaced with match |
|
110 | ## server url to the issue, each {id} will be replaced with match | |
104 | ## fetched from the regex and {repo} is replaced with full repository name |
|
111 | ## fetched from the regex and {repo} is replaced with full repository name | |
105 | ## including groups {repo_name} is replaced with just name of repo |
|
112 | ## including groups {repo_name} is replaced with just name of repo | |
106 |
|
113 | |||
107 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
114 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
108 |
|
115 | |||
109 | ## prefix to add to link to indicate it's an url |
|
116 | ## prefix to add to link to indicate it's an url | |
110 | ## #314 will be replaced by <issue_prefix><id> |
|
117 | ## #314 will be replaced by <issue_prefix><id> | |
111 |
|
118 | |||
112 | issue_prefix = # |
|
119 | issue_prefix = # | |
113 |
|
120 | |||
114 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify |
|
121 | ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify | |
115 | ## multiple patterns, to other issues server, wiki or others |
|
122 | ## multiple patterns, to other issues server, wiki or others | |
116 | ## below an example how to create a wiki pattern |
|
123 | ## below an example how to create a wiki pattern | |
117 | # #wiki-some-id -> https://mywiki.com/some-id |
|
124 | # #wiki-some-id -> https://mywiki.com/some-id | |
118 |
|
125 | |||
119 | #issue_pat_wiki = (?:wiki-)(.+) |
|
126 | #issue_pat_wiki = (?:wiki-)(.+) | |
120 | #issue_server_link_wiki = https://mywiki.com/{id} |
|
127 | #issue_server_link_wiki = https://mywiki.com/{id} | |
121 | #issue_prefix_wiki = WIKI- |
|
128 | #issue_prefix_wiki = WIKI- | |
122 |
|
129 | |||
123 |
|
130 | |||
124 | ## instance-id prefix |
|
131 | ## instance-id prefix | |
125 | ## a prefix key for this instance used for cache invalidation when running |
|
132 | ## a prefix key for this instance used for cache invalidation when running | |
126 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
133 | ## multiple instances of rhodecode, make sure it's globally unique for | |
127 | ## all running rhodecode instances. Leave empty if you don't use it |
|
134 | ## all running rhodecode instances. Leave empty if you don't use it | |
128 | instance_id = |
|
135 | instance_id = | |
129 |
|
136 | |||
130 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
137 | ## alternative return HTTP header for failed authentication. Default HTTP | |
131 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
138 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with | |
132 | ## handling that. Set this variable to 403 to return HTTPForbidden |
|
139 | ## handling that. Set this variable to 403 to return HTTPForbidden | |
133 | auth_ret_code = |
|
140 | auth_ret_code = | |
134 |
|
141 | |||
135 | #################################### |
|
142 | #################################### | |
136 | ### CELERY CONFIG #### |
|
143 | ### CELERY CONFIG #### | |
137 | #################################### |
|
144 | #################################### | |
138 | use_celery = false |
|
145 | use_celery = false | |
139 | broker.host = localhost |
|
146 | broker.host = localhost | |
140 | broker.vhost = rabbitmqhost |
|
147 | broker.vhost = rabbitmqhost | |
141 | broker.port = 5672 |
|
148 | broker.port = 5672 | |
142 | broker.user = rabbitmq |
|
149 | broker.user = rabbitmq | |
143 | broker.password = qweqwe |
|
150 | broker.password = qweqwe | |
144 |
|
151 | |||
145 | celery.imports = rhodecode.lib.celerylib.tasks |
|
152 | celery.imports = rhodecode.lib.celerylib.tasks | |
146 |
|
153 | |||
147 | celery.result.backend = amqp |
|
154 | celery.result.backend = amqp | |
148 | celery.result.dburi = amqp:// |
|
155 | celery.result.dburi = amqp:// | |
149 | celery.result.serialier = json |
|
156 | celery.result.serialier = json | |
150 |
|
157 | |||
151 | #celery.send.task.error.emails = true |
|
158 | #celery.send.task.error.emails = true | |
152 | #celery.amqp.task.result.expires = 18000 |
|
159 | #celery.amqp.task.result.expires = 18000 | |
153 |
|
160 | |||
154 | celeryd.concurrency = 2 |
|
161 | celeryd.concurrency = 2 | |
155 | #celeryd.log.file = celeryd.log |
|
162 | #celeryd.log.file = celeryd.log | |
156 | celeryd.log.level = debug |
|
163 | celeryd.log.level = debug | |
157 | celeryd.max.tasks.per.child = 1 |
|
164 | celeryd.max.tasks.per.child = 1 | |
158 |
|
165 | |||
159 | #tasks will never be sent to the queue, but executed locally instead. |
|
166 | #tasks will never be sent to the queue, but executed locally instead. | |
160 | celery.always.eager = false |
|
167 | celery.always.eager = false | |
161 |
|
168 | |||
162 | #################################### |
|
169 | #################################### | |
163 | ### BEAKER CACHE #### |
|
170 | ### BEAKER CACHE #### | |
164 | #################################### |
|
171 | #################################### | |
165 | beaker.cache.data_dir=%(here)s/data/cache/data |
|
172 | beaker.cache.data_dir=%(here)s/data/cache/data | |
166 | beaker.cache.lock_dir=%(here)s/data/cache/lock |
|
173 | beaker.cache.lock_dir=%(here)s/data/cache/lock | |
167 |
|
174 | |||
168 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long |
|
175 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
169 |
|
176 | |||
170 | beaker.cache.super_short_term.type=memory |
|
177 | beaker.cache.super_short_term.type=memory | |
171 | beaker.cache.super_short_term.expire=10 |
|
178 | beaker.cache.super_short_term.expire=10 | |
172 | beaker.cache.super_short_term.key_length = 256 |
|
179 | beaker.cache.super_short_term.key_length = 256 | |
173 |
|
180 | |||
174 | beaker.cache.short_term.type=memory |
|
181 | beaker.cache.short_term.type=memory | |
175 | beaker.cache.short_term.expire=60 |
|
182 | beaker.cache.short_term.expire=60 | |
176 | beaker.cache.short_term.key_length = 256 |
|
183 | beaker.cache.short_term.key_length = 256 | |
177 |
|
184 | |||
178 | beaker.cache.long_term.type=memory |
|
185 | beaker.cache.long_term.type=memory | |
179 | beaker.cache.long_term.expire=36000 |
|
186 | beaker.cache.long_term.expire=36000 | |
180 | beaker.cache.long_term.key_length = 256 |
|
187 | beaker.cache.long_term.key_length = 256 | |
181 |
|
188 | |||
182 | beaker.cache.sql_cache_short.type=memory |
|
189 | beaker.cache.sql_cache_short.type=memory | |
183 | beaker.cache.sql_cache_short.expire=10 |
|
190 | beaker.cache.sql_cache_short.expire=10 | |
184 | beaker.cache.sql_cache_short.key_length = 256 |
|
191 | beaker.cache.sql_cache_short.key_length = 256 | |
185 |
|
192 | |||
186 | beaker.cache.sql_cache_med.type=memory |
|
193 | beaker.cache.sql_cache_med.type=memory | |
187 | beaker.cache.sql_cache_med.expire=360 |
|
194 | beaker.cache.sql_cache_med.expire=360 | |
188 | beaker.cache.sql_cache_med.key_length = 256 |
|
195 | beaker.cache.sql_cache_med.key_length = 256 | |
189 |
|
196 | |||
190 | beaker.cache.sql_cache_long.type=file |
|
197 | beaker.cache.sql_cache_long.type=file | |
191 | beaker.cache.sql_cache_long.expire=3600 |
|
198 | beaker.cache.sql_cache_long.expire=3600 | |
192 | beaker.cache.sql_cache_long.key_length = 256 |
|
199 | beaker.cache.sql_cache_long.key_length = 256 | |
193 |
|
200 | |||
194 | #################################### |
|
201 | #################################### | |
195 | ### BEAKER SESSION #### |
|
202 | ### BEAKER SESSION #### | |
196 | #################################### |
|
203 | #################################### | |
197 | ## Type of storage used for the session, current types are |
|
204 | ## Type of storage used for the session, current types are | |
198 | ## dbm, file, memcached, database, and memory. |
|
205 | ## dbm, file, memcached, database, and memory. | |
199 | ## The storage uses the Container API |
|
206 | ## The storage uses the Container API | |
200 | ## that is also used by the cache system. |
|
207 | ## that is also used by the cache system. | |
201 |
|
208 | |||
202 | ## db session ## |
|
209 | ## db session ## | |
203 | #beaker.session.type = ext:database |
|
210 | #beaker.session.type = ext:database | |
204 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode |
|
211 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
205 | #beaker.session.table_name = db_session |
|
212 | #beaker.session.table_name = db_session | |
206 |
|
213 | |||
207 | ## encrypted cookie client side session, good for many instances ## |
|
214 | ## encrypted cookie client side session, good for many instances ## | |
208 | #beaker.session.type = cookie |
|
215 | #beaker.session.type = cookie | |
209 |
|
216 | |||
210 | ## file based cookies (default) ## |
|
217 | ## file based cookies (default) ## | |
211 | #beaker.session.type = file |
|
218 | #beaker.session.type = file | |
212 |
|
219 | |||
213 |
|
220 | |||
214 | beaker.session.key = rhodecode |
|
221 | beaker.session.key = rhodecode | |
215 | ## secure cookie requires AES python libraries ## |
|
222 | ## secure cookie requires AES python libraries ## | |
216 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu |
|
223 | #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu | |
217 | #beaker.session.validate_key = 9712sds2212c--zxc123 |
|
224 | #beaker.session.validate_key = 9712sds2212c--zxc123 | |
218 | ## sets session as invalid if it haven't been accessed for given amount of time |
|
225 | ## sets session as invalid if it haven't been accessed for given amount of time | |
219 | beaker.session.timeout = 2592000 |
|
226 | beaker.session.timeout = 2592000 | |
220 | beaker.session.httponly = true |
|
227 | beaker.session.httponly = true | |
221 | #beaker.session.cookie_path = /<your-prefix> |
|
228 | #beaker.session.cookie_path = /<your-prefix> | |
222 |
|
229 | |||
223 | ## uncomment for https secure cookie ## |
|
230 | ## uncomment for https secure cookie ## | |
224 | beaker.session.secure = false |
|
231 | beaker.session.secure = false | |
225 |
|
232 | |||
226 | ## auto save the session to not to use .save() ## |
|
233 | ## auto save the session to not to use .save() ## | |
227 | beaker.session.auto = False |
|
234 | beaker.session.auto = False | |
228 |
|
235 | |||
229 | ## default cookie expiration time in seconds `true` expire at browser close ## |
|
236 | ## default cookie expiration time in seconds `true` expire at browser close ## | |
230 | #beaker.session.cookie_expires = 3600 |
|
237 | #beaker.session.cookie_expires = 3600 | |
231 |
|
238 | |||
232 |
|
239 | |||
233 | ############################ |
|
240 | ############################ | |
234 | ## ERROR HANDLING SYSTEMS ## |
|
241 | ## ERROR HANDLING SYSTEMS ## | |
235 | ############################ |
|
242 | ############################ | |
236 |
|
243 | |||
237 | #################### |
|
244 | #################### | |
238 | ### [errormator] ### |
|
245 | ### [errormator] ### | |
239 | #################### |
|
246 | #################### | |
240 |
|
247 | |||
241 | # Errormator is tailored to work with RhodeCode, see |
|
248 | # Errormator is tailored to work with RhodeCode, see | |
242 | # http://errormator.com for details how to obtain an account |
|
249 | # http://errormator.com for details how to obtain an account | |
243 | # you must install python package `errormator_client` to make it work |
|
250 | # you must install python package `errormator_client` to make it work | |
244 |
|
251 | |||
245 | # errormator enabled |
|
252 | # errormator enabled | |
246 | errormator = true |
|
253 | errormator = true | |
247 |
|
254 | |||
248 | errormator.server_url = https://api.errormator.com |
|
255 | errormator.server_url = https://api.errormator.com | |
249 | errormator.api_key = YOUR_API_KEY |
|
256 | errormator.api_key = YOUR_API_KEY | |
250 |
|
257 | |||
251 | # TWEAK AMOUNT OF INFO SENT HERE |
|
258 | # TWEAK AMOUNT OF INFO SENT HERE | |
252 |
|
259 | |||
253 | # enables 404 error logging (default False) |
|
260 | # enables 404 error logging (default False) | |
254 | errormator.report_404 = false |
|
261 | errormator.report_404 = false | |
255 |
|
262 | |||
256 | # time in seconds after request is considered being slow (default 1) |
|
263 | # time in seconds after request is considered being slow (default 1) | |
257 | errormator.slow_request_time = 1 |
|
264 | errormator.slow_request_time = 1 | |
258 |
|
265 | |||
259 | # record slow requests in application |
|
266 | # record slow requests in application | |
260 | # (needs to be enabled for slow datastore recording and time tracking) |
|
267 | # (needs to be enabled for slow datastore recording and time tracking) | |
261 | errormator.slow_requests = true |
|
268 | errormator.slow_requests = true | |
262 |
|
269 | |||
263 | # enable hooking to application loggers |
|
270 | # enable hooking to application loggers | |
264 | # errormator.logging = true |
|
271 | # errormator.logging = true | |
265 |
|
272 | |||
266 | # minimum log level for log capture |
|
273 | # minimum log level for log capture | |
267 | # errormator.logging.level = WARNING |
|
274 | # errormator.logging.level = WARNING | |
268 |
|
275 | |||
269 | # send logs only from erroneous/slow requests |
|
276 | # send logs only from erroneous/slow requests | |
270 | # (saves API quota for intensive logging) |
|
277 | # (saves API quota for intensive logging) | |
271 | errormator.logging_on_error = false |
|
278 | errormator.logging_on_error = false | |
272 |
|
279 | |||
273 | # list of additonal keywords that should be grabbed from environ object |
|
280 | # list of additonal keywords that should be grabbed from environ object | |
274 | # can be string with comma separated list of words in lowercase |
|
281 | # can be string with comma separated list of words in lowercase | |
275 | # (by default client will always send following info: |
|
282 | # (by default client will always send following info: | |
276 | # 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
283 | # 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that | |
277 | # start with HTTP* this list be extended with additional keywords here |
|
284 | # start with HTTP* this list be extended with additional keywords here | |
278 | errormator.environ_keys_whitelist = |
|
285 | errormator.environ_keys_whitelist = | |
279 |
|
286 | |||
280 |
|
287 | |||
281 | # list of keywords that should be blanked from request object |
|
288 | # list of keywords that should be blanked from request object | |
282 | # can be string with comma separated list of words in lowercase |
|
289 | # can be string with comma separated list of words in lowercase | |
283 | # (by default client will always blank keys that contain following words |
|
290 | # (by default client will always blank keys that contain following words | |
284 | # 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
291 | # 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' | |
285 | # this list be extended with additional keywords set here |
|
292 | # this list be extended with additional keywords set here | |
286 | errormator.request_keys_blacklist = |
|
293 | errormator.request_keys_blacklist = | |
287 |
|
294 | |||
288 |
|
295 | |||
289 | # list of namespaces that should be ignores when gathering log entries |
|
296 | # list of namespaces that should be ignores when gathering log entries | |
290 | # can be string with comma separated list of namespaces |
|
297 | # can be string with comma separated list of namespaces | |
291 | # (by default the client ignores own entries: errormator_client.client) |
|
298 | # (by default the client ignores own entries: errormator_client.client) | |
292 | errormator.log_namespace_blacklist = |
|
299 | errormator.log_namespace_blacklist = | |
293 |
|
300 | |||
294 |
|
301 | |||
295 | ################ |
|
302 | ################ | |
296 | ### [sentry] ### |
|
303 | ### [sentry] ### | |
297 | ################ |
|
304 | ################ | |
298 |
|
305 | |||
299 | # sentry is a alternative open source error aggregator |
|
306 | # sentry is a alternative open source error aggregator | |
300 | # you must install python packages `sentry` and `raven` to enable |
|
307 | # you must install python packages `sentry` and `raven` to enable | |
301 |
|
308 | |||
302 | sentry.dsn = YOUR_DNS |
|
309 | sentry.dsn = YOUR_DNS | |
303 | sentry.servers = |
|
310 | sentry.servers = | |
304 | sentry.name = |
|
311 | sentry.name = | |
305 | sentry.key = |
|
312 | sentry.key = | |
306 | sentry.public_key = |
|
313 | sentry.public_key = | |
307 | sentry.secret_key = |
|
314 | sentry.secret_key = | |
308 | sentry.project = |
|
315 | sentry.project = | |
309 | sentry.site = |
|
316 | sentry.site = | |
310 | sentry.include_paths = |
|
317 | sentry.include_paths = | |
311 | sentry.exclude_paths = |
|
318 | sentry.exclude_paths = | |
312 |
|
319 | |||
313 |
|
320 | |||
314 | ################################################################################ |
|
321 | ################################################################################ | |
315 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
322 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
316 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
323 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
317 | ## execute malicious code after an exception is raised. ## |
|
324 | ## execute malicious code after an exception is raised. ## | |
318 | ################################################################################ |
|
325 | ################################################################################ | |
319 | set debug = false |
|
326 | set debug = false | |
320 |
|
327 | |||
321 | ################################## |
|
328 | ################################## | |
322 | ### LOGVIEW CONFIG ### |
|
329 | ### LOGVIEW CONFIG ### | |
323 | ################################## |
|
330 | ################################## | |
324 | logview.sqlalchemy = #faa |
|
331 | logview.sqlalchemy = #faa | |
325 | logview.pylons.templating = #bfb |
|
332 | logview.pylons.templating = #bfb | |
326 | logview.pylons.util = #eee |
|
333 | logview.pylons.util = #eee | |
327 |
|
334 | |||
328 | ######################################################### |
|
335 | ######################################################### | |
329 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
336 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
330 | ######################################################### |
|
337 | ######################################################### | |
331 |
|
338 | |||
332 | # SQLITE [default] |
|
339 | # SQLITE [default] | |
333 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db |
|
340 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db | |
334 |
|
341 | |||
335 | # POSTGRESQL |
|
342 | # POSTGRESQL | |
336 | # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode |
|
343 | # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode | |
337 |
|
344 | |||
338 | # MySQL |
|
345 | # MySQL | |
339 | # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode |
|
346 | # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode | |
340 |
|
347 | |||
341 | # see sqlalchemy docs for others |
|
348 | # see sqlalchemy docs for others | |
342 |
|
349 | |||
343 | sqlalchemy.db1.echo = false |
|
350 | sqlalchemy.db1.echo = false | |
344 | sqlalchemy.db1.pool_recycle = 3600 |
|
351 | sqlalchemy.db1.pool_recycle = 3600 | |
345 | sqlalchemy.db1.convert_unicode = true |
|
352 | sqlalchemy.db1.convert_unicode = true | |
346 |
|
353 | |||
347 | ################################ |
|
354 | ################################ | |
348 | ### LOGGING CONFIGURATION #### |
|
355 | ### LOGGING CONFIGURATION #### | |
349 | ################################ |
|
356 | ################################ | |
350 | [loggers] |
|
357 | [loggers] | |
351 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer |
|
358 | keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer | |
352 |
|
359 | |||
353 | [handlers] |
|
360 | [handlers] | |
354 | keys = console, console_sql |
|
361 | keys = console, console_sql | |
355 |
|
362 | |||
356 | [formatters] |
|
363 | [formatters] | |
357 | keys = generic, color_formatter, color_formatter_sql |
|
364 | keys = generic, color_formatter, color_formatter_sql | |
358 |
|
365 | |||
359 | ############# |
|
366 | ############# | |
360 | ## LOGGERS ## |
|
367 | ## LOGGERS ## | |
361 | ############# |
|
368 | ############# | |
362 | [logger_root] |
|
369 | [logger_root] | |
363 | level = NOTSET |
|
370 | level = NOTSET | |
364 | handlers = console |
|
371 | handlers = console | |
365 |
|
372 | |||
366 | [logger_routes] |
|
373 | [logger_routes] | |
367 | level = DEBUG |
|
374 | level = DEBUG | |
368 | handlers = |
|
375 | handlers = | |
369 | qualname = routes.middleware |
|
376 | qualname = routes.middleware | |
370 | # "level = DEBUG" logs the route matched and routing variables. |
|
377 | # "level = DEBUG" logs the route matched and routing variables. | |
371 | propagate = 1 |
|
378 | propagate = 1 | |
372 |
|
379 | |||
373 | [logger_beaker] |
|
380 | [logger_beaker] | |
374 | level = DEBUG |
|
381 | level = DEBUG | |
375 | handlers = |
|
382 | handlers = | |
376 | qualname = beaker.container |
|
383 | qualname = beaker.container | |
377 | propagate = 1 |
|
384 | propagate = 1 | |
378 |
|
385 | |||
379 | [logger_templates] |
|
386 | [logger_templates] | |
380 | level = INFO |
|
387 | level = INFO | |
381 | handlers = |
|
388 | handlers = | |
382 | qualname = pylons.templating |
|
389 | qualname = pylons.templating | |
383 | propagate = 1 |
|
390 | propagate = 1 | |
384 |
|
391 | |||
385 | [logger_rhodecode] |
|
392 | [logger_rhodecode] | |
386 | level = DEBUG |
|
393 | level = DEBUG | |
387 | handlers = |
|
394 | handlers = | |
388 | qualname = rhodecode |
|
395 | qualname = rhodecode | |
389 | propagate = 1 |
|
396 | propagate = 1 | |
390 |
|
397 | |||
391 | [logger_sqlalchemy] |
|
398 | [logger_sqlalchemy] | |
392 | level = INFO |
|
399 | level = INFO | |
393 | handlers = console_sql |
|
400 | handlers = console_sql | |
394 | qualname = sqlalchemy.engine |
|
401 | qualname = sqlalchemy.engine | |
395 | propagate = 0 |
|
402 | propagate = 0 | |
396 |
|
403 | |||
397 | [logger_whoosh_indexer] |
|
404 | [logger_whoosh_indexer] | |
398 | level = DEBUG |
|
405 | level = DEBUG | |
399 | handlers = |
|
406 | handlers = | |
400 | qualname = whoosh_indexer |
|
407 | qualname = whoosh_indexer | |
401 | propagate = 1 |
|
408 | propagate = 1 | |
402 |
|
409 | |||
403 | ############## |
|
410 | ############## | |
404 | ## HANDLERS ## |
|
411 | ## HANDLERS ## | |
405 | ############## |
|
412 | ############## | |
406 |
|
413 | |||
407 | [handler_console] |
|
414 | [handler_console] | |
408 | class = StreamHandler |
|
415 | class = StreamHandler | |
409 | args = (sys.stderr,) |
|
416 | args = (sys.stderr,) | |
410 | level = INFO |
|
417 | level = INFO | |
411 | formatter = generic |
|
418 | formatter = generic | |
412 |
|
419 | |||
413 | [handler_console_sql] |
|
420 | [handler_console_sql] | |
414 | class = StreamHandler |
|
421 | class = StreamHandler | |
415 | args = (sys.stderr,) |
|
422 | args = (sys.stderr,) | |
416 | level = WARN |
|
423 | level = WARN | |
417 | formatter = generic |
|
424 | formatter = generic | |
418 |
|
425 | |||
419 | ################ |
|
426 | ################ | |
420 | ## FORMATTERS ## |
|
427 | ## FORMATTERS ## | |
421 | ################ |
|
428 | ################ | |
422 |
|
429 | |||
423 | [formatter_generic] |
|
430 | [formatter_generic] | |
424 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
431 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
425 | datefmt = %Y-%m-%d %H:%M:%S |
|
432 | datefmt = %Y-%m-%d %H:%M:%S | |
426 |
|
433 | |||
427 | [formatter_color_formatter] |
|
434 | [formatter_color_formatter] | |
428 | class=rhodecode.lib.colored_formatter.ColorFormatter |
|
435 | class=rhodecode.lib.colored_formatter.ColorFormatter | |
429 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
436 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
430 | datefmt = %Y-%m-%d %H:%M:%S |
|
437 | datefmt = %Y-%m-%d %H:%M:%S | |
431 |
|
438 | |||
432 | [formatter_color_formatter_sql] |
|
439 | [formatter_color_formatter_sql] | |
433 | class=rhodecode.lib.colored_formatter.ColorFormatterSql |
|
440 | class=rhodecode.lib.colored_formatter.ColorFormatterSql | |
434 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
441 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
435 | datefmt = %Y-%m-%d %H:%M:%S |
|
442 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,175 +1,183 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | rhodecode.controllers.feed |
|
3 | rhodecode.controllers.feed | |
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 |
|
5 | |||
6 | Feed controller for rhodecode |
|
6 | Feed controller for rhodecode | |
7 |
|
7 | |||
8 | :created_on: Apr 23, 2010 |
|
8 | :created_on: Apr 23, 2010 | |
9 | :author: marcink |
|
9 | :author: marcink | |
10 | :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> |
|
10 | :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> | |
11 | :license: GPLv3, see COPYING for more details. |
|
11 | :license: GPLv3, see COPYING for more details. | |
12 | """ |
|
12 | """ | |
13 | # This program is free software: you can redistribute it and/or modify |
|
13 | # This program is free software: you can redistribute it and/or modify | |
14 | # it under the terms of the GNU General Public License as published by |
|
14 | # it under the terms of the GNU General Public License as published by | |
15 | # the Free Software Foundation, either version 3 of the License, or |
|
15 | # the Free Software Foundation, either version 3 of the License, or | |
16 | # (at your option) any later version. |
|
16 | # (at your option) any later version. | |
17 | # |
|
17 | # | |
18 | # This program is distributed in the hope that it will be useful, |
|
18 | # This program is distributed in the hope that it will be useful, | |
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | # GNU General Public License for more details. |
|
21 | # GNU General Public License for more details. | |
22 | # |
|
22 | # | |
23 | # You should have received a copy of the GNU General Public License |
|
23 | # You should have received a copy of the GNU General Public License | |
24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
25 |
|
25 | |||
26 | import logging |
|
26 | import logging | |
27 |
|
27 | |||
28 | from pylons import url, response, tmpl_context as c |
|
28 | from pylons import url, response, tmpl_context as c | |
29 | from pylons.i18n.translation import _ |
|
29 | from pylons.i18n.translation import _ | |
30 |
|
30 | |||
31 | from beaker.cache import cache_region, region_invalidate |
|
31 | from beaker.cache import cache_region, region_invalidate | |
32 | from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed |
|
32 | from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed | |
33 |
|
33 | |||
34 | from rhodecode.lib import helpers as h |
|
34 | from rhodecode.lib import helpers as h | |
35 | from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator |
|
35 | from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator | |
36 | from rhodecode.lib.base import BaseRepoController |
|
36 | from rhodecode.lib.base import BaseRepoController | |
37 | from rhodecode.lib.diffs import DiffProcessor, LimitedDiffContainer |
|
37 | from rhodecode.lib.diffs import DiffProcessor, LimitedDiffContainer | |
38 | from rhodecode.model.db import CacheInvalidation |
|
38 | from rhodecode.model.db import CacheInvalidation | |
|
39 | from rhodecode.lib.utils2 import safe_int, str2bool | |||
39 |
|
40 | |||
40 | log = logging.getLogger(__name__) |
|
41 | log = logging.getLogger(__name__) | |
41 |
|
42 | |||
42 |
|
43 | |||
43 | class FeedController(BaseRepoController): |
|
44 | class FeedController(BaseRepoController): | |
44 |
|
45 | |||
45 | @LoginRequired(api_access=True) |
|
46 | @LoginRequired(api_access=True) | |
46 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
47 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', | |
47 | 'repository.admin') |
|
48 | 'repository.admin') | |
48 | def __before__(self): |
|
49 | def __before__(self): | |
49 | super(FeedController, self).__before__() |
|
50 | super(FeedController, self).__before__() | |
50 | #common values for feeds |
|
51 | #common values for feeds | |
51 | self.description = _('Changes on %s repository') |
|
52 | self.description = _('Changes on %s repository') | |
52 | self.title = self.title = _('%s %s feed') % (c.rhodecode_name, '%s') |
|
53 | self.title = self.title = _('%s %s feed') % (c.rhodecode_name, '%s') | |
53 | self.language = 'en-us' |
|
54 | self.language = 'en-us' | |
54 | self.ttl = "5" |
|
55 | self.ttl = "5" | |
55 | self.feed_nr = 20 |
|
56 | import rhodecode | |
|
57 | CONF = rhodecode.CONFIG | |||
|
58 | self.include_diff = str2bool(CONF.get('rss_include_diff', False)) | |||
|
59 | self.feed_nr = safe_int(CONF.get('rss_items_per_page', 20)) | |||
56 | # we need to protect from parsing huge diffs here other way |
|
60 | # we need to protect from parsing huge diffs here other way | |
57 |
# we can kill the server |
|
61 | # we can kill the server | |
58 | self.feed_diff_limit = 32 * 1024 |
|
62 | self.feed_diff_limit = safe_int(CONF.get('rss_cut_off_limit'), 32 * 1024) | |
59 |
|
63 | |||
60 | def _get_title(self, cs): |
|
64 | def _get_title(self, cs): | |
61 | return "%s" % ( |
|
65 | return "%s" % ( | |
62 | h.shorter(cs.message, 160) |
|
66 | h.shorter(cs.message, 160) | |
63 | ) |
|
67 | ) | |
64 |
|
68 | |||
65 | def __changes(self, cs): |
|
69 | def __changes(self, cs): | |
66 | changes = [] |
|
70 | changes = [] | |
67 | diff_processor = DiffProcessor(cs.diff(), |
|
71 | diff_processor = DiffProcessor(cs.diff(), | |
68 | diff_limit=self.feed_diff_limit) |
|
72 | diff_limit=self.feed_diff_limit) | |
69 | _parsed = diff_processor.prepare(inline_diff=False) |
|
73 | _parsed = diff_processor.prepare(inline_diff=False) | |
70 | limited_diff = False |
|
74 | limited_diff = False | |
71 | if isinstance(_parsed, LimitedDiffContainer): |
|
75 | if isinstance(_parsed, LimitedDiffContainer): | |
72 | limited_diff = True |
|
76 | limited_diff = True | |
73 |
|
77 | |||
74 | for st in _parsed: |
|
78 | for st in _parsed: | |
75 | st.update({'added': st['stats'][0], |
|
79 | st.update({'added': st['stats'][0], | |
76 | 'removed': st['stats'][1]}) |
|
80 | 'removed': st['stats'][1]}) | |
77 | changes.append('\n %(operation)s %(filename)s ' |
|
81 | changes.append('\n %(operation)s %(filename)s ' | |
78 | '(%(added)s lines added, %(removed)s lines removed)' |
|
82 | '(%(added)s lines added, %(removed)s lines removed)' | |
79 | % st) |
|
83 | % st) | |
80 | if limited_diff: |
|
84 | if limited_diff: | |
81 | changes = changes + ['\n ' + |
|
85 | changes = changes + ['\n ' + | |
82 | _('Changeset was too big and was cut off...')] |
|
86 | _('Changeset was too big and was cut off...')] | |
83 | return changes |
|
87 | return diff_processor, changes | |
84 |
|
88 | |||
85 | def __get_desc(self, cs): |
|
89 | def __get_desc(self, cs): | |
86 | desc_msg = [] |
|
90 | desc_msg = [] | |
87 | desc_msg.append('%s %s %s<br/>' % (h.person(cs.author), |
|
91 | desc_msg.append('%s %s %s<br/>' % (h.person(cs.author), | |
88 | _('commited on'), |
|
92 | _('commited on'), | |
89 | h.fmt_date(cs.date))) |
|
93 | h.fmt_date(cs.date))) | |
90 | #branches, tags, bookmarks |
|
94 | #branches, tags, bookmarks | |
91 | if cs.branch: |
|
95 | if cs.branch: | |
92 | desc_msg.append('branch: %s<br/>' % cs.branch) |
|
96 | desc_msg.append('branch: %s<br/>' % cs.branch) | |
93 | if h.is_hg(c.rhodecode_repo): |
|
97 | if h.is_hg(c.rhodecode_repo): | |
94 | for book in cs.bookmarks: |
|
98 | for book in cs.bookmarks: | |
95 | desc_msg.append('bookmark: %s<br/>' % book) |
|
99 | desc_msg.append('bookmark: %s<br/>' % book) | |
96 | for tag in cs.tags: |
|
100 | for tag in cs.tags: | |
97 | desc_msg.append('tag: %s<br/>' % tag) |
|
101 | desc_msg.append('tag: %s<br/>' % tag) | |
|
102 | diff_processor, changes = self.__changes(cs) | |||
98 | # rev link |
|
103 | # rev link | |
99 | _url = url('changeset_home', repo_name=cs.repository.name, |
|
104 | _url = url('changeset_home', repo_name=cs.repository.name, | |
100 | revision=cs.raw_id, qualified=True) |
|
105 | revision=cs.raw_id, qualified=True) | |
101 | desc_msg.append('changesest: <a href="%s">%s</a>' % (_url, cs.raw_id[:8])) |
|
106 | desc_msg.append('changesest: <a href="%s">%s</a>' % (_url, cs.raw_id[:8])) | |
102 |
|
107 | |||
103 | desc_msg.append('<pre>') |
|
108 | desc_msg.append('<pre>') | |
104 | desc_msg.append(cs.message) |
|
109 | desc_msg.append(cs.message) | |
105 | desc_msg.append('\n') |
|
110 | desc_msg.append('\n') | |
106 |
desc_msg.extend( |
|
111 | desc_msg.extend(changes) | |
|
112 | if self.include_diff: | |||
|
113 | desc_msg.append('\n\n') | |||
|
114 | desc_msg.append(diff_processor.as_raw()) | |||
107 | desc_msg.append('</pre>') |
|
115 | desc_msg.append('</pre>') | |
108 | return desc_msg |
|
116 | return desc_msg | |
109 |
|
117 | |||
110 | def atom(self, repo_name): |
|
118 | def atom(self, repo_name): | |
111 | """Produce an atom-1.0 feed via feedgenerator module""" |
|
119 | """Produce an atom-1.0 feed via feedgenerator module""" | |
112 |
|
120 | |||
113 | @cache_region('long_term') |
|
121 | @cache_region('long_term') | |
114 | def _get_feed_from_cache(key): |
|
122 | def _get_feed_from_cache(key): | |
115 | feed = Atom1Feed( |
|
123 | feed = Atom1Feed( | |
116 | title=self.title % repo_name, |
|
124 | title=self.title % repo_name, | |
117 | link=url('summary_home', repo_name=repo_name, |
|
125 | link=url('summary_home', repo_name=repo_name, | |
118 | qualified=True), |
|
126 | qualified=True), | |
119 | description=self.description % repo_name, |
|
127 | description=self.description % repo_name, | |
120 | language=self.language, |
|
128 | language=self.language, | |
121 | ttl=self.ttl |
|
129 | ttl=self.ttl | |
122 | ) |
|
130 | ) | |
123 |
|
131 | |||
124 | for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])): |
|
132 | for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])): | |
125 | feed.add_item(title=self._get_title(cs), |
|
133 | feed.add_item(title=self._get_title(cs), | |
126 | link=url('changeset_home', repo_name=repo_name, |
|
134 | link=url('changeset_home', repo_name=repo_name, | |
127 | revision=cs.raw_id, qualified=True), |
|
135 | revision=cs.raw_id, qualified=True), | |
128 | author_name=cs.author, |
|
136 | author_name=cs.author, | |
129 | description=''.join(self.__get_desc(cs)), |
|
137 | description=''.join(self.__get_desc(cs)), | |
130 | pubdate=cs.date, |
|
138 | pubdate=cs.date, | |
131 | ) |
|
139 | ) | |
132 |
|
140 | |||
133 | response.content_type = feed.mime_type |
|
141 | response.content_type = feed.mime_type | |
134 | return feed.writeString('utf-8') |
|
142 | return feed.writeString('utf-8') | |
135 |
|
143 | |||
136 | key = repo_name + '_ATOM' |
|
144 | key = repo_name + '_ATOM' | |
137 | inv = CacheInvalidation.invalidate(key) |
|
145 | inv = CacheInvalidation.invalidate(key) | |
138 | if inv is not None: |
|
146 | if inv is not None: | |
139 | region_invalidate(_get_feed_from_cache, None, key) |
|
147 | region_invalidate(_get_feed_from_cache, None, key) | |
140 | CacheInvalidation.set_valid(inv.cache_key) |
|
148 | CacheInvalidation.set_valid(inv.cache_key) | |
141 | return _get_feed_from_cache(key) |
|
149 | return _get_feed_from_cache(key) | |
142 |
|
150 | |||
143 | def rss(self, repo_name): |
|
151 | def rss(self, repo_name): | |
144 | """Produce an rss2 feed via feedgenerator module""" |
|
152 | """Produce an rss2 feed via feedgenerator module""" | |
145 |
|
153 | |||
146 | @cache_region('long_term') |
|
154 | @cache_region('long_term') | |
147 | def _get_feed_from_cache(key): |
|
155 | def _get_feed_from_cache(key): | |
148 | feed = Rss201rev2Feed( |
|
156 | feed = Rss201rev2Feed( | |
149 | title=self.title % repo_name, |
|
157 | title=self.title % repo_name, | |
150 | link=url('summary_home', repo_name=repo_name, |
|
158 | link=url('summary_home', repo_name=repo_name, | |
151 | qualified=True), |
|
159 | qualified=True), | |
152 | description=self.description % repo_name, |
|
160 | description=self.description % repo_name, | |
153 | language=self.language, |
|
161 | language=self.language, | |
154 | ttl=self.ttl |
|
162 | ttl=self.ttl | |
155 | ) |
|
163 | ) | |
156 |
|
164 | |||
157 | for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])): |
|
165 | for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])): | |
158 | feed.add_item(title=self._get_title(cs), |
|
166 | feed.add_item(title=self._get_title(cs), | |
159 | link=url('changeset_home', repo_name=repo_name, |
|
167 | link=url('changeset_home', repo_name=repo_name, | |
160 | revision=cs.raw_id, qualified=True), |
|
168 | revision=cs.raw_id, qualified=True), | |
161 | author_name=cs.author, |
|
169 | author_name=cs.author, | |
162 | description=''.join(self.__get_desc(cs)), |
|
170 | description=''.join(self.__get_desc(cs)), | |
163 | pubdate=cs.date, |
|
171 | pubdate=cs.date, | |
164 | ) |
|
172 | ) | |
165 |
|
173 | |||
166 | response.content_type = feed.mime_type |
|
174 | response.content_type = feed.mime_type | |
167 | return feed.writeString('utf-8') |
|
175 | return feed.writeString('utf-8') | |
168 |
|
176 | |||
169 | key = repo_name + '_RSS' |
|
177 | key = repo_name + '_RSS' | |
170 | inv = CacheInvalidation.invalidate(key) |
|
178 | inv = CacheInvalidation.invalidate(key) | |
171 | if inv is not None: |
|
179 | if inv is not None: | |
172 | region_invalidate(_get_feed_from_cache, None, key) |
|
180 | region_invalidate(_get_feed_from_cache, None, key) | |
173 | CacheInvalidation.set_valid(inv.cache_key) |
|
181 | CacheInvalidation.set_valid(inv.cache_key) | |
174 | return _get_feed_from_cache(key) |
|
182 | return _get_feed_from_cache(key) | |
175 |
|
183 |
General Comments 0
You need to be logged in to leave comments.
Login now