#!/usr/bin/env python3
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

from logging import getLogger

from cmk.utils.setup_search_index import request_index_rebuild


def main():
    logger = getLogger("init-redis")
    try:
        request_index_rebuild()
    except Exception as excpt:
        logger.error("ERROR: Failed to request building of Setup search index")
        logger.error(excpt)


if __name__ == "__main__":
    main()
