mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Remove global state about configuration and logs
Many things have been changed to make this possible, probably leading to many hidden bugs waiting to be found. Related to #122.
This commit is contained in:
parent
8ac19ae0fc
commit
2f97d7d1e1
15 changed files with 576 additions and 488 deletions
|
@ -23,14 +23,12 @@ Launch a Radicale FastCGI server according to configuration.
|
|||
|
||||
"""
|
||||
|
||||
try:
|
||||
from flup.server.fcgi import WSGIServer
|
||||
except ImportError:
|
||||
from flipflop import WSGIServer
|
||||
import os
|
||||
import radicale
|
||||
from flipflop import WSGIServer
|
||||
|
||||
|
||||
radicale.log.start()
|
||||
radicale.log.LOGGER.info("Starting Radicale FastCGI server")
|
||||
WSGIServer(radicale.Application()).run()
|
||||
radicale.log.LOGGER.info("Stopping Radicale FastCGI server")
|
||||
configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
|
||||
logger = radicale.log.start()
|
||||
WSGIServer(radicale.Application(configuration, logger)).run()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue