@wbg-mde/server
Version:
MDE communication channel with Socket IO and express.
23 lines • 874 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const rfactory = require('@wbg-mde/r-factory');
class ImportDatasetSocket {
constructor(activeSocket) {
this.socket = activeSocket;
}
/*
* Init resequence
************************************************/
init() {
this.socket.on('import-dataset-req', (params) => {
this.importDataset(JSON.parse(params));
});
}
importDataset(params) {
rfactory.importMaster.readFile(params.filePath, params.projectId, params.fileId, params.rPath, params.memoryLimit, params.frequencyLimit, (response) => {
this.socket.emit('import-dataset-resp', { response, fileId: params.fileId });
});
}
}
exports.ImportDatasetSocket = ImportDatasetSocket;
//# sourceMappingURL=import-dataset.socket.js.map