"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "PrinterWebsocketTask", {
    enumerable: true,
    get: function() {
        return PrinterWebsocketTask;
    }
});
class PrinterWebsocketTask {
    printerSocketStore;
    settingsStore;
    octoprintClient;
    taskManagerService;
    logger;
    constructor({ printerSocketStore, octoprintClient, settingsStore, taskManagerService, loggerFactory }){
        this.printerSocketStore = printerSocketStore;
        this.settingsStore = settingsStore;
        this.octoprintClient = octoprintClient;
        this.taskManagerService = taskManagerService;
        this.logger = loggerFactory(PrinterWebsocketTask.name);
    }
    async run() {
        const startTime = Date.now();
        const result = await this.printerSocketStore.reconnectPrinterSockets();
        if (this.settingsStore.getDebugSettingsSensitive()?.debugSocketReconnect) {
            this.logger.log(`Socket reconnect (${Date.now() - startTime}ms)`, result);
        }
    }
}

//# sourceMappingURL=printer-websocket.task.js.map