#include "dead_indexes_clear.h"

#include <saas/rtyserver/common/common_messages.h>
#include <library/cpp/mediator/messenger.h>
#include <library/cpp/logger/global/global.h>

void TDeadIndexesCleanerWatchDogHandle::DoCheck(TInstant /*timeNow*/) try {
    TMessageRemoveEmptyIndexes messageRemoveDead;
    SendGlobalMessage(messageRemoveDead);
} catch (const yexception& e) {
    Cerr << "Exception during DeadIndexes cleaner: " << e.what() << Endl;
    ERROR_LOG << "Exception during DeadIndexes cleaner: " << e.what() << Endl;
} catch (...) {
    // Do nothing
}
