문제

I am using Q_oper8 in node.js to runs jobs in a queue using a pool of processes . It works fine if i return the data from actionMethod .But when I use any call back function to return data in actionMethod it does not work.

Can any one help me out ? Thanks.

도움이 되었습니까?

해결책

After looking into the library I found the solution. you need to have actionMethod(action,fnReturnResponse) as childPrecess Handler.

And what ever you need to return , you can return from your callback function by calling fnReturnResponse(returnValue);

You will also need to pass second argument of childProcess handler to be true (stands for isAsync)

childProcess.handler(actionMethod,true);

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top