~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead.py

  • Committer: Robey Pointer
  • Date: 2007-09-04 17:06:03 UTC
  • mto: (140.2.1 merge-robey)
  • mto: This revision was merged to the branch mainline in revision 142.
  • Revision ID: robey@lag.net-20070904170603-58307k9mqq24zf99
i can't decide on a decent default date format, so i'm punting on it:
unify all date displays to call format_date(), and have that configurable.
the default display is 'fancy', meaning '23 Aug 12:34' for recent dates,
and '23 Aug 2006' for old dates.  any other config value is treated as
the strftime format string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
import cherrypy
13
13
cherrypy.lowercase_api = True
14
14
 
15
 
from loggerhead import daemon, release
 
15
from loggerhead import daemon, release, util
16
16
 
17
17
 
18
18
def make_handler(config, filename):
111
111
    Root = Root(config)
112
112
    
113
113
    # re-index every 6 hours
114
 
    
115
114
    index_freq = config.get('cache_rebuild_frequency', 6 * 3600)
116
115
    turbogears.scheduler.add_interval_task(initialdelay=1, interval=index_freq, action=Root._check_rebuild)
117
 
    
 
116
 
 
117
    util.set_date_format(config.get('date_format', 'fancy'))
118
118
    try:
119
119
        turbogears.start_server(Root)
120
120
    finally: