equal
deleted
inserted
replaced
131 # handler |
131 # handler |
132 if config.pyro_enabled() and config.name != 'all-in-one': |
132 if config.pyro_enabled() and config.name != 'all-in-one': |
133 config.input_config('pyro', inputlevel) |
133 config.input_config('pyro', inputlevel) |
134 print '\n'+underline_title('Configuring the sources') |
134 print '\n'+underline_title('Configuring the sources') |
135 sourcesfile = config.sources_file() |
135 sourcesfile = config.sources_file() |
|
136 # XXX hack to make Method('default_instance_id') usable in db option |
|
137 # defs (in native.py) |
|
138 Configuration.default_instance_id = staticmethod(lambda: config.appid) |
136 sconfig = Configuration(options=SOURCE_TYPES['native'].options) |
139 sconfig = Configuration(options=SOURCE_TYPES['native'].options) |
137 sconfig.adapter = 'native' |
140 sconfig.adapter = 'native' |
138 sconfig.input_config(inputlevel=inputlevel) |
141 sconfig.input_config(inputlevel=inputlevel) |
139 sourcescfg = {'system': sconfig} |
142 sourcescfg = {'system': sconfig} |
140 for cube in cubes: |
143 for cube in cubes: |
463 |
466 |
464 def run(self, args): |
467 def run(self, args): |
465 from cubicweb.server.server import RepositoryServer |
468 from cubicweb.server.server import RepositoryServer |
466 appid = pop_arg(args, msg='No instance specified !') |
469 appid = pop_arg(args, msg='No instance specified !') |
467 config = ServerConfiguration.config_for(appid) |
470 config = ServerConfiguration.config_for(appid) |
|
471 if sys.platform == 'win32': |
|
472 if not self.config.debug: |
|
473 from logging import getLogger |
|
474 logger = getLogger('cubicweb.ctl') |
|
475 logger.info('Forcing debug mode on win32 platform') |
|
476 self.config.debug = True |
468 debug = self.config.debug |
477 debug = self.config.debug |
469 # create the server |
478 # create the server |
470 server = RepositoryServer(config, debug) |
479 server = RepositoryServer(config, debug) |
471 # go ! (don't daemonize in debug mode) |
480 # go ! (don't daemonize in debug mode) |
472 pidfile = config['pid-file'] |
481 pidfile = config['pid-file'] |