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