from typing import Any

from ._BaseMessageProcessor import BaseUpdaterProcessor
from application.interactor import LoaderUpdaterInteractor
from application.util import settings


class LoaderUpdaterProcessor(BaseUpdaterProcessor):
    def __init__(
        self,           # type: LoaderUpdaterProcessor
        interactor,     # type: LoaderUpdaterInteractor
    ):
        # type: (...) -> None
        super(LoaderUpdaterProcessor, self).__init__()

        self.interactor = interactor

    def call_business(
        self,   # type: LoaderUpdaterProcessor
        _,      # type: str
    ):
        # type: (...) -> Any

        settings.clear_status()
        return self.interactor.update_loaders()
