0

I would like to run OpenCPU job asynchronously and collect its results from a different session. In Rserve + RSclient I can do the following:

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

and then when I'm ready to receive results call either:

RS.collect(connection)

to try to collect results and wait until they are ready if job is still running or:

RS.collect(connection, timeout = 0)

if I want to check the job state and let it run if it is still not finished.

Is it possible with OpenCPU to receive the tmp/*/... path with the result id before the job has finished?

Lukasz
  • 148
  • 11

1 Answers1

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.

Community
  • 1
  • 1
Leonardo Nomdedeu
  • 814
  • 1
  • 8
  • 11
  • Did you find the solution for it? I had a look at https://github.com/joelkuiper/aplomb unfortunately the documentation is not in detail and unable to figure out how to use it. – Prabhakar Jan 28 '17 at 10:26