Exemplo n.º 1
0
def init_db_command():
    from geobox.config import GeoBoxState
    from geobox.model.fixtures import add_fixtures
    app_state = GeoBoxState.initialize()
    if os.path.exists(app_state.db_filename):
        os.remove(app_state.db_filename)

    app_state = GeoBoxState.initialize()
    session = app_state.user_db_session()

    session.commit()
Exemplo n.º 2
0
def init_db_command():
    from geobox.config import GeoBoxState
    from geobox.model.fixtures import add_fixtures
    app_state = GeoBoxState.initialize()
    if os.path.exists(app_state.db_filename):
        os.remove(app_state.db_filename)

    app_state = GeoBoxState.initialize()
    session = app_state.user_db_session()

    session.commit()
Exemplo n.º 3
0
def server():
    import time
    from geobox.config import GeoBoxState

    app_state = GeoBoxState.initialize()

    from geobox.process.base import ProcessThread
    p = ProcessThread(app_state=app_state,
        task_class_mapping=task_class_mapping,
        task_process_mapping=task_process_mapping)
    p.start()

    while True:
        try:
            time.sleep(1)
        except KeyboardInterrupt:
            break
    app_state.shutdown_app()
Exemplo n.º 4
0
def server():
    import time
    from geobox.config import GeoBoxState

    app_state = GeoBoxState.initialize()

    from geobox.process.base import ProcessThread
    p = ProcessThread(app_state=app_state,
                      task_class_mapping=task_class_mapping,
                      task_process_mapping=task_process_mapping)
    p.start()

    while True:
        try:
            time.sleep(1)
        except KeyboardInterrupt:
            break
    app_state.shutdown_app()