@fdm-monster/server
Version:
FDM Monster is a bulk OctoPrint manager to set up, configure and monitor 3D printers. Our aim is to provide extremely optimized websocket performance and reliability.
30 lines (29 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ClientDistDownloadTask", {
enumerable: true,
get: function() {
return ClientDistDownloadTask;
}
});
const _serverconstants = require("../server.constants");
class ClientDistDownloadTask {
clientBundleService;
logger;
constructor(loggerFactory, clientBundleService){
this.clientBundleService = clientBundleService;
this.logger = loggerFactory(ClientDistDownloadTask.name);
}
async run() {
const result = await this.clientBundleService.shouldUpdateWithReason(false, _serverconstants.AppConstants.defaultClientMinimum);
if (!result.shouldUpdate) {
this.logger.log(`Client bundle update skipped. Reason: ${result.reason}`);
return;
}
this.logger.log(`Client bundle update required. Reason for updating: ${result.reason}`);
await this.clientBundleService.downloadClientUpdate(_serverconstants.AppConstants.defaultClientMinimum);
}
}
//# sourceMappingURL=client-bundle.task.js.map