Esempio n. 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
Esempio n. 2
0
def index_all_users_job():
    with APP.app_context():
        UserDataService.sync_all_users()