On Wed, Sep 23, 2015 at 4:18 PM, Kengsreng Tang <[email protected]> wrote: > Let say we have a very long process API(it took more than 10s). > > One solution was to make the process in background and return right > away, and we also need to create anther API to get_status whether the > process completed or still in progress. > > I'm looking for a better solution.
I don't know if this will be better, and I'm just thinking out loud here, but: If you use an AJAX request from the client (browser) to your application, it can launch the task and then, again client-side, you can resolve the promise when that task completes. If you don't want the user to move to a different page during that time, you could run a spinner while it completes. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t-BbgLjRupr%3Duk6Uz8YLm6TZ%2B6j4zF5jeJ7T3uopXTs%3Dw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

