Commit 5200c335 Harvey

no message

1 个父辈 4ed06084
...@@ -49,7 +49,7 @@ function wrapper_task(func) { ...@@ -49,7 +49,7 @@ function wrapper_task(func) {
return await func(...args); return await func(...args);
} }
catch (error) { catch (error) {
return { error: error.message }; return { error };
} }
}; };
} }
......
...@@ -48,11 +48,11 @@ class JobManager { ...@@ -48,11 +48,11 @@ class JobManager {
}), executorTimeout * 1000); }), executorTimeout * 1000);
} }
result = await jobHandler(jobParams, this.context); result = await jobHandler(jobParams, this.context);
if (result && result.err) { if (result && result.error) {
error = result.err; error = result.error;
delete result.err; delete result.error;
if (Object.keys(result).length === 0) { if (Object.keys(result).length === 0) {
result = null; result = undefined;
} }
} }
} }
......
//# sourceMappingURL=work.js.map
\ No newline at end of file \ No newline at end of file
module.exports = ({ a, b }) => {
return a + b;
};
//# sourceMappingURL=worker.js.map
\ No newline at end of file \ No newline at end of file
import { create_match_data, calc_pre_win } from '../../bl/sxjx' import { create_match_data, calc_pre_win } from '../../bl/sxjx'
export async function sxjx_create_match_data() { export async function sxjx_create_match_data() {
return create_match_data(); return create_match_data()
} }
export async function sxjx_calc_pre_win() { export async function sxjx_calc_pre_win() {
return calc_pre_win(); return calc_pre_win()
} }
...@@ -80,7 +80,7 @@ function wrapper_task(func) { ...@@ -80,7 +80,7 @@ function wrapper_task(func) {
try { try {
return await func(...args); return await func(...args);
} catch (error) { } catch (error) {
return { error: error.message }; return { error };
} }
}; };
} }
......
...@@ -107,11 +107,11 @@ export class JobManager { ...@@ -107,11 +107,11 @@ export class JobManager {
result = await jobHandler(jobParams, this.context); result = await jobHandler(jobParams, this.context);
if (result && result.err) { if (result && result.error) {
error = result.err error = result.error
delete result.err delete result.error
if (Object.keys(result).length === 0) { if (Object.keys(result).length === 0) {
result = null result = undefined
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!