Show More
@@ -47,15 +47,26 b' cache_dir = %(here)s/data' | |||
|
47 | 47 | #################################### |
|
48 | 48 | ### BEAKER CACHE #### |
|
49 | 49 | #################################### |
|
50 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
51 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
52 | beaker.cache.regions=super_short_term,short_term,long_term | |
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
55 | beaker.cache.short_term.type=memory | |
|
56 |
|
|
|
57 |
|
|
|
58 | beaker.cache.super_short_term.expire=10 | |
|
50 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
51 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
52 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
55 | ||
|
56 | beaker.cache.short_term.type=memory | |
|
57 | beaker.cache.short_term.expire=60 | |
|
58 | ||
|
59 | beaker.cache.super_short_term.type=memory | |
|
60 | beaker.cache.super_short_term.expire=10 | |
|
61 | ||
|
62 | beaker.cache.sql_cache_short.type=memory | |
|
63 | beaker.cache.sql_cache_short.expire=5 | |
|
64 | ||
|
65 | beaker.cache.sql_cache_med.type=memory | |
|
66 | beaker.cache.sql_cache_med.expire=360 | |
|
67 | ||
|
68 | beaker.cache.sql_cache_long.type=file | |
|
69 | beaker.cache.sql_cache_long.expire=3600 | |
|
59 | 70 | |
|
60 | 71 | #################################### |
|
61 | 72 | ### BEAKER SESSION #### |
@@ -3,12 +3,17 b'' | |||
|
3 | 3 | Changelog |
|
4 | 4 | ========= |
|
5 | 5 | |
|
6 | 1.0.0rc4 (**2010-10-12**) | |
|
6 | 7 | |
|
7 | 1.0.0rc3 (**tip**) | |
|
8 | - fixed python2.5 missing simplejson imports (thanks to Jens Bäckman) | |
|
9 | - removed cache_manager settings from sqlalchemy meta | |
|
10 | - added sqlalchemy cache settings to ini files | |
|
11 | ||
|
12 | 1.0.0rc3 (**2010-10-11**) | |
|
8 | 13 | |
|
9 | 14 | - fixed i18n during installation. |
|
10 | 15 | |
|
11 |
1.0.0rc2 (** |
|
|
16 | 1.0.0rc2 (**2010-10-11**) | |
|
12 | 17 | |
|
13 | 18 | - Disabled dirsize in file browser, it's causing nasty bug when dir renames |
|
14 | 19 | occure. After vcs is fixed it'll be put back again. |
@@ -26,7 +26,7 b' Setting up the application' | |||
|
26 | 26 | - Remember that the given path for mercurial_ repositories must be write |
|
27 | 27 | accessible for the application. It's very important since RhodeCode web interface |
|
28 | 28 | will work even without such an access but, when trying to do a push it'll |
|
29 |
eventually fail |
|
|
29 | eventually fail with permission denied errors. | |
|
30 | 30 | - Run |
|
31 | 31 | |
|
32 | 32 | :: |
@@ -35,15 +35,12 b' Setting up the application' | |||
|
35 | 35 | |
|
36 | 36 | - This command runs the rhodecode server the app should be available at the |
|
37 | 37 | 127.0.0.1:5000. This ip and port is configurable via the production.ini |
|
38 | file created in previos step | |
|
38 | file created in previous step | |
|
39 | 39 | - Use admin account you created to login. |
|
40 | 40 | - Default permissions on each repository is read, and owner is admin. So |
|
41 | remember to update these. | |
|
42 | ||
|
43 | - All needed configs are inside rhodecode sources ie. celeryconfig.py, | |
|
44 | development.ini, production.ini You can configure the email, ports, loggers, | |
|
45 | workers from there. | |
|
41 | remember to update these if needed. | |
|
46 | 42 | |
|
43 | ||
|
47 | 44 | Setting up Whoosh |
|
48 | 45 | ----------------- |
|
49 | 46 | |
@@ -51,7 +48,7 b' Setting up Whoosh' | |||
|
51 | 48 | |
|
52 | 49 | :: |
|
53 | 50 | |
|
54 | python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <put_here_path_to_repos> | |
|
51 | python /var/www/rhodecode/<rhodecode_installation_path>/lib/indexers/daemon.py incremental <put_here_path_to_repos> | |
|
55 | 52 | |
|
56 | 53 | When using incremental mode whoosh will check last modification date of each file |
|
57 | 54 | and add it to reindex if newer file is available. Also indexing daemon checks |
@@ -69,7 +66,7 b' Sample config for nginx::' | |||
|
69 | 66 | listen 80; |
|
70 | 67 | server_name hg.myserver.com; |
|
71 | 68 | access_log /var/log/nginx/rhodecode.access.log; |
|
72 | error_log /var/log/nginx/rhodecode.error.log; | |
|
69 | error_log /var/log/nginx/rhodecode.error.log; | |
|
73 | 70 | location / { |
|
74 | 71 | root /var/www/rhodecode/rhodecode/public/; |
|
75 | 72 | if (!-f $request_filename){ |
@@ -81,7 +78,7 b' Sample config for nginx::' | |||
|
81 | 78 | } |
|
82 | 79 | } |
|
83 | 80 | |
|
84 |
Here's the proxy.conf. It's tun |
|
|
81 | Here's the proxy.conf. It's tuned so it'll not timeout on long | |
|
85 | 82 | pushes and also on large pushes:: |
|
86 | 83 | |
|
87 | 84 | proxy_redirect off; |
@@ -111,7 +108,7 b' in production.ini file::' | |||
|
111 | 108 | lang=en |
|
112 | 109 | cache_dir = %(here)s/data |
|
113 | 110 | |
|
114 | To not have the statics served by the application. | |
|
111 | To not have the statics served by the application. And improve speed. | |
|
115 | 112 | |
|
116 | 113 | |
|
117 | 114 | Other configuration files |
@@ -47,21 +47,32 b' cache_dir = %(here)s/data' | |||
|
47 | 47 | #################################### |
|
48 | 48 | ### BEAKER CACHE #### |
|
49 | 49 | #################################### |
|
50 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
51 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
52 | beaker.cache.regions=super_short_term,short_term,long_term | |
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
55 | beaker.cache.short_term.type=memory | |
|
56 |
|
|
|
57 |
|
|
|
58 | beaker.cache.super_short_term.expire=10 | |
|
50 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
51 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
52 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
55 | ||
|
56 | beaker.cache.short_term.type=memory | |
|
57 | beaker.cache.short_term.expire=60 | |
|
58 | ||
|
59 | beaker.cache.super_short_term.type=memory | |
|
60 | beaker.cache.super_short_term.expire=10 | |
|
61 | ||
|
62 | beaker.cache.sql_cache_short.type=memory | |
|
63 | beaker.cache.sql_cache_short.expire=5 | |
|
64 | ||
|
65 | beaker.cache.sql_cache_med.type=memory | |
|
66 | beaker.cache.sql_cache_med.expire=360 | |
|
67 | ||
|
68 | beaker.cache.sql_cache_long.type=file | |
|
69 | beaker.cache.sql_cache_long.expire=3600 | |
|
59 | 70 | |
|
60 | 71 | #################################### |
|
61 | 72 | ### BEAKER SESSION #### |
|
62 | 73 | #################################### |
|
63 | 74 | ## Type of storage used for the session, current types are |
|
64 |
## dbm, file, memcached, database, and memory. |
|
|
75 | ## "dbm", "file", "memcached", "database", and "memory". | |
|
65 | 76 | ## The storage uses the Container API |
|
66 | 77 | ##that is also used by the cache system. |
|
67 | 78 | beaker.session.type = file |
@@ -24,7 +24,7 b' versioning implementation: http://semver' | |||
|
24 | 24 | @author: marcink |
|
25 | 25 | """ |
|
26 | 26 | |
|
27 |
VERSION = (1, 0, 0, 'rc |
|
|
27 | VERSION = (1, 0, 0, 'rc4') | |
|
28 | 28 | |
|
29 | 29 | __version__ = '.'.join((str(each) for each in VERSION[:4])) |
|
30 | 30 |
@@ -48,21 +48,32 b' app_instance_uuid = ${app_instance_uuid}' | |||
|
48 | 48 | #################################### |
|
49 | 49 | ### BEAKER CACHE #### |
|
50 | 50 | #################################### |
|
51 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
52 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
53 | beaker.cache.regions=super_short_term,short_term,long_term | |
|
54 | beaker.cache.long_term.type=memory | |
|
55 | beaker.cache.long_term.expire=36000 | |
|
56 | beaker.cache.short_term.type=memory | |
|
57 |
beaker.cache.short_term. |
|
|
58 |
beaker.cache.s |
|
|
59 | beaker.cache.super_short_term.expire=10 | |
|
51 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
52 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
53 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
|
54 | beaker.cache.long_term.type=memory | |
|
55 | beaker.cache.long_term.expire=36000 | |
|
56 | ||
|
57 | beaker.cache.short_term.type=memory | |
|
58 | beaker.cache.short_term.expire=60 | |
|
59 | ||
|
60 | beaker.cache.super_short_term.type=memory | |
|
61 | beaker.cache.super_short_term.expire=10 | |
|
62 | ||
|
63 | beaker.cache.sql_cache_short.type=memory | |
|
64 | beaker.cache.sql_cache_short.expire=5 | |
|
65 | ||
|
66 | beaker.cache.sql_cache_med.type=memory | |
|
67 | beaker.cache.sql_cache_med.expire=360 | |
|
68 | ||
|
69 | beaker.cache.sql_cache_long.type=file | |
|
70 | beaker.cache.sql_cache_long.expire=3600 | |
|
60 | 71 | |
|
61 | 72 | #################################### |
|
62 | 73 | ### BEAKER SESSION #### |
|
63 | 74 | #################################### |
|
64 | 75 | ## Type of storage used for the session, current types are |
|
65 |
## dbm, file, memcached, database, and memory. |
|
|
76 | ## "dbm", "file", "memcached", "database", and "memory". | |
|
66 | 77 | ## The storage uses the Container API |
|
67 | 78 | ##that is also used by the cache system. |
|
68 | 79 | beaker.session.type = file |
@@ -22,7 +22,7 b' Created on April 21, 2010' | |||
|
22 | 22 | changelog controller for pylons |
|
23 | 23 | @author: marcink |
|
24 | 24 | """ |
|
25 | from json import dumps | |
|
25 | ||
|
26 | 26 | from mercurial.graphmod import colored, CHANGESET, revisions as graph_rev |
|
27 | 27 | from pylons import request, session, tmpl_context as c |
|
28 | 28 | from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator |
@@ -32,6 +32,12 b' from webhelpers.paginate import Page' | |||
|
32 | 32 | import logging |
|
33 | 33 | log = logging.getLogger(__name__) |
|
34 | 34 | |
|
35 | try: | |
|
36 | import json | |
|
37 | except ImportError: | |
|
38 | #python 2.5 compatibility | |
|
39 | import simplejson as json | |
|
40 | ||
|
35 | 41 | class ChangelogController(BaseController): |
|
36 | 42 | |
|
37 | 43 | @LoginRequired() |
@@ -69,7 +75,7 b' class ChangelogController(BaseController' | |||
|
69 | 75 | |
|
70 | 76 | def _graph(self, repo, size, p): |
|
71 | 77 | revcount = size |
|
72 | if not repo.revisions:return dumps([]), 0 | |
|
78 | if not repo.revisions:return json.dumps([]), 0 | |
|
73 | 79 | |
|
74 | 80 | max_rev = repo.revisions[-1] |
|
75 | 81 | offset = 1 if p == 1 else ((p - 1) * revcount + 1) |
@@ -86,5 +92,5 b' class ChangelogController(BaseController' | |||
|
86 | 92 | continue |
|
87 | 93 | data.append(('', vtx, edges)) |
|
88 | 94 | |
|
89 | c.jsdata = dumps(data) | |
|
95 | c.jsdata = json.dumps(data) | |
|
90 | 96 |
@@ -35,7 +35,11 b' from datetime import datetime, timedelta' | |||
|
35 | 35 | from time import mktime |
|
36 | 36 | import calendar |
|
37 | 37 | import logging |
|
38 | import json | |
|
38 | try: | |
|
39 | import json | |
|
40 | except ImportError: | |
|
41 | #python 2.5 compatibility | |
|
42 | import simplejson as json | |
|
39 | 43 | log = logging.getLogger(__name__) |
|
40 | 44 | |
|
41 | 45 | class SummaryController(BaseController): |
@@ -3,9 +3,6 b' from sqlalchemy.ext.declarative import d' | |||
|
3 | 3 | from sqlalchemy.orm import scoped_session, sessionmaker |
|
4 | 4 | from rhodecode.model import caching_query |
|
5 | 5 | from beaker import cache |
|
6 | import os | |
|
7 | from os.path import join as jn, dirname as dn, abspath | |
|
8 | import time | |
|
9 | 6 | |
|
10 | 7 | # Beaker CacheManager. A home base for cache configurations. |
|
11 | 8 | cache_manager = cache.CacheManager() |
@@ -25,39 +22,5 b' Base = declarative_base()' | |||
|
25 | 22 | #For another db... |
|
26 | 23 | #Base2 = declarative_base() |
|
27 | 24 | |
|
28 | #=============================================================================== | |
|
29 | # CACHE OPTIONS | |
|
30 | #=============================================================================== | |
|
31 | cache_base = jn(dn(dn(dn(abspath(__file__)))), 'data') | |
|
32 | cache_dir = jn(cache_base, 'cache') | |
|
33 | ||
|
34 | if not os.path.isdir(cache_base): | |
|
35 | os.mkdir(cache_base) | |
|
36 | ||
|
37 | if not os.path.isdir(cache_dir): | |
|
38 | os.mkdir(cache_dir) | |
|
39 | # set start_time to current time | |
|
40 | # to re-cache everything | |
|
41 | # upon application startup | |
|
42 | start_time = time.time() | |
|
43 | # configure the "sqlalchemy" cache region. | |
|
44 | cache_manager.regions['sql_cache_short'] = { | |
|
45 | 'type':'memory', | |
|
46 | 'data_dir':cache_dir, | |
|
47 | 'expire':10, | |
|
48 | 'start_time':start_time | |
|
49 | } | |
|
50 | cache_manager.regions['sql_cache_med'] = { | |
|
51 | 'type':'memory', | |
|
52 | 'data_dir':cache_dir, | |
|
53 | 'expire':360, | |
|
54 | 'start_time':start_time | |
|
55 | } | |
|
56 | cache_manager.regions['sql_cache_long'] = { | |
|
57 | 'type':'file', | |
|
58 | 'data_dir':cache_dir, | |
|
59 | 'expire':3600, | |
|
60 | 'start_time':start_time | |
|
61 | } | |
|
62 | 25 | #to use cache use this in query |
|
63 | 26 | #.options(FromCache("sqlalchemy_cache_type", "cachekey")) |
@@ -1,5 +1,5 b'' | |||
|
1 | 1 | [egg_info] |
|
2 |
tag_build = rc |
|
|
2 | tag_build = rc4 | |
|
3 | 3 | tag_svn_revision = true |
|
4 | 4 | |
|
5 | 5 | [easy_install] |
@@ -32,3 +32,11 b' domain = rhodecode' | |||
|
32 | 32 | input_file = rhodecode/i18n/rhodecode.pot |
|
33 | 33 | output_dir = rhodecode/i18n |
|
34 | 34 | previous = true |
|
35 | ||
|
36 | [build_sphinx] | |
|
37 | source-dir = docs/ | |
|
38 | build-dir = docs/_build | |
|
39 | all_files = 1 | |
|
40 | ||
|
41 | [upload_sphinx] | |
|
42 | upload-dir = docs/_build/html No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now