0

我想异步运行 OpenCPU 作业并从不同的会话中收集其结果。在Rserve+RSclient我可以执行以下操作:

RS.eval(connection, expression, wait = FALSE)
# do something while the job is running

然后当我准备好接收结果时调用:

RS.collect(connection)

如果作业仍在运行,则尝试收集结果并等待它们准备好,或者:

RS.collect(connection, timeout = 0)

如果我想检查作业状态并在它仍未完成时让它运行。

OpenCPU 是否可以在作业完成之前tmp/*/...接收带有结果 id 的路径?

4

1 回答 1

1

It seems acording to this post that OpenCPU does not support asynchronous jobs. Every request between the browser and the OpenCPU server must be alive in order to execute a script or function and receive a response succesfully. If you find any workaround I would be pleased to know it. In my case, I need to run a long process (may takes a few hours) and I can't keep alive the client request until the process finishes.

于 2015-05-06T15:17:15.107 回答