UNPKG

flexbiz-server

Version:

Flexible Server

4 lines (3 loc) 625 B
const path=require("path"); exports.parse=function($filePath$$,$callback$$,$options$$){let $onImportProcess$$=path.dirname(__dirname)+"/workers/excelParser.js";if(!global.excelParsePool){const $StaticPool$$=require("./WorkerStaticPool");global.excelParsePool=new $StaticPool$$($onImportProcess$$)}global.excelParsePool.exec({filePath:$filePath$$,options:$options$$,configs:{database:global.configs.database}},$response$$=>{$response$$.error?(Logger.error("[excel] L\u1ed7i \u0111\u1ecdc v\u00e0 parse excel data:",$response$$.error), $callback$$($response$$.error)):$callback$$(null,$response$$.data,$response$$.columns)})};