package ru.soune.nocopy.configuration.file;

import lombok.AllArgsConstructor;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import ru.soune.nocopy.service.file.FileProcessingOrchestrator;

@Component
@AllArgsConstructor
public class NoCopyInitializer {

    private final FileProcessingOrchestrator orchestrator;

    @EventListener(ApplicationReadyEvent.class)
    public void initializeOnStartup() {
        orchestrator.initializeProcessingQueue();
    }
}