示例#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()