예제 #1
0
def sync_all():
    """
    Sync the filesystem and ES DB by scanning and comparing datastructures
    on both the filesystem and ES DB.
    """
    total = UserDataService.sync_all_users()
    data = dict(status='ok',
                jobs=total,
                description='{total} jobs created'.format(total=total))
    return jsonify(data), 200
예제 #2
0
파일: wsgi.py 프로젝트: olavgg/py-sth
def index_all_users_job():
    with APP.app_context():
        UserDataService.sync_all_users()