~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead.py

  • Committer: Mattias Eriksson
  • Date: 2008-03-06 07:30:37 UTC
  • mto: (149.1.1 socket_host)
  • mto: This revision was merged to the branch mainline in revision 150.
  • Revision ID: snaggen@acc.umu.se-20080306073037-cd3fxfs1t9kkrt1q
Make it possible to override the interface loggerhead listens to. This is done by setting server.socket_host in the configuration file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python2.5
 
1
#!/usr/bin/env python2.4
2
2
 
3
3
import pkg_resources
4
4
pkg_resources.require("TurboGears")
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):
99
99
        sys.stderr.write('PID file: %s\n' % (pidfile,))
100
100
        sys.stderr.write('\n')
101
101
    
102
 
        #daemon.daemonize(pidfile, home)
 
102
        daemon.daemonize(pidfile, home)
103
103
 
104
104
    setup_logging(home, config, foreground=options.foreground)
105
105
        
114
114
    index_freq = config.get('cache_rebuild_frequency', 6 * 3600)
115
115
    turbogears.scheduler.add_interval_task(initialdelay=1, interval=index_freq, action=Root._check_rebuild)
116
116
 
 
117
    util.set_date_format(config.get('date_format', 'fancy'))
117
118
    try:
118
119
        turbogears.start_server(Root)
119
120
    finally: