示例#1
0
def helper(url):
    service = dict(url=url)
    c = Config('.')
    c.from_pyfile('{}/../webocr/conf/dev-conf.py'.format(
        os.path.abspath(os.path.dirname(__file__))))

    return create_service.apply(args=[service, c])
示例#2
0
def app():
    c = Config('.')
    c.from_pyfile('{}/../webocr/conf/dev-conf.py'.format(
        os.path.abspath(os.path.dirname(__file__))))
    db = SchemalessDb(c)
    task_server = CeleryRestTornadoTaskServer(c)

    app = App(c, db, task_server)
    return app.app
示例#3
0
import os

from webocr.app import App
from webocr.config import Config
from webocr.db import SchemalessDb
from webocr.taskserver import CeleryRestTornadoTaskServer


if __name__ == '__main__':
    c = Config('.')
    c.from_pyfile('{}/../webocr/conf/dev-conf.py'.format(
        os.path.abspath(os.path.dirname(__file__))))
    db = SchemalessDb(c)
    task_server = CeleryRestTornadoTaskServer(c)

    app = App(c, db, task_server)
    app.run()
示例#4
0
def app():
    c = Config('.')
    c.from_pyfile('{}/../dev-conf.py'.format(current_dir()))
    a = App(c)
    return a.app
示例#5
0
def app():
    c = Config('.')
    c.from_pyfile('{}/../dev-conf.py'.format(current_dir()))
    a = App(c)
    return a.app
示例#6
0
文件: run.py 项目: jorgemarsal/webocr
import os

from webocr.app import App
from webocr.config import Config
from webocr.db import SchemalessDb
from webocr.taskserver import CeleryRestTornadoTaskServer


if __name__ == "__main__":
    c = Config(".")
    c.from_pyfile("{}/../webocr/conf/dev-conf.py".format(os.path.abspath(os.path.dirname(__file__))))
    db = SchemalessDb(c)
    task_server = CeleryRestTornadoTaskServer(c)

    app = App(c, db, task_server)
    app.run()