示例#1
0
# -*- coding: utf-8 -*-
from logging import DEBUG, INFO, WARNING

from tori.application import Application
from tori.common import LoggerFactory

import fixtures

LoggerFactory.instance().set_default_level(INFO)

application = Application('config/app.xml')

# Load data fixtures if necessary
fixtures.auto_load()

# Start up the service.
application.start()
示例#2
0
# -*- coding: utf-8 -*-
from logging import DEBUG, INFO, WARNING

from tori.application import Application
from tori.common import LoggerFactory

import fixtures

LoggerFactory.instance().set_default_level(INFO)

application = Application("config/app.xml")

# Load data fixtures if necessary
fixtures.auto_load()

# Start up the service.
application.start()
示例#3
0
文件: server.py 项目: nepteam/eryri
    """
    global settings

    settings['modules'] = [
        'eryri.security',
        'eryri.management',
        'eryri.beacon'
    ]

    settings['roles'] = {}

    for module_path in settings['modules']:
        config = Loader(module_path).package
        settings['roles'].update(config.roles)

LoggerFactory.instance().set_default_level(INFO if '--dev' in argv else ERROR)

# Setup
application = Application('config/app.xml')
load_default_config()

# Initiate the service
application.start()

# Kill all running threads.
for thread in threading.enumerate():
    if not thread.isAlive():
        continue

    thread_name = str(thread.getName())
示例#4
0
# -*- coding: utf-8 -*-
from logging import ERROR, WARNING, DEBUG, INFO
from sys import exit, argv
from tori.application import Application
from tori.common      import LoggerFactory

LoggerFactory.instance().set_default_level(INFO if '--dev' in argv else ERROR)

application = Application('config/app.xml')
application.start()