节点的child_process中的运行函数

时间:2019-01-29 03:24:23

标签: node.js

假设我具有功能

Last Amount Chosen =
LOOKUPVALUE (
    Table1[Amount Chosen],
    Table1[Action ID], MAXX (
        KEEPFILTERS ( VALUES ( 'Table1'[Customer ID] ) ),
        CALCULATE ( MAX ( 'Table1'[Action ID] ) )
    )
)

,我想在节点的子进程中运行此功能。我该怎么办?我已经搜索了答案,但是找不到答案。

1 个答案:

答案 0 :(得分:0)

您可以尝试child_process.fork()

const child_process = require('child_process');
child_process.fork(pathToScriptWithFunction);