from interactor import BaseInteractor
from model.resync import ResyncRequest


class ResyncInteractor(BaseInteractor):
    def execute(self, resync_request):
        # type: (ResyncRequest) -> None
        events_to_dispatch = self.log_repository.fetch_resync_events(resync_request)
        self.event_dispatcher.dispatch_events(events_to_dispatch)
