Ejemplo n.º 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])
Ejemplo n.º 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
Ejemplo n.º 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()
Ejemplo n.º 4
0
def app():
    c = Config('.')
    c.from_pyfile('{}/../dev-conf.py'.format(current_dir()))
    a = App(c)
    return a.app
Ejemplo n.º 5
0
def app():
    c = Config('.')
    c.from_pyfile('{}/../dev-conf.py'.format(current_dir()))
    a = App(c)
    return a.app
Ejemplo n.º 6
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()