예제 #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()