It sounds like this might be best served by encapsulating the caller in a job and then setting up a dedicated queue for that job in your background processes, if I am understanding correctly what this is. If you need to have the results display when complete then you could set up a poller or a channel to listen to it. By shifting it to the background you can prevent a deadlock.
On Thu, Aug 8, 2019 at 12:24 PM San Ji <sarun...@gmail.com> wrote: > Hi > I run Rails on quite a complicated situation but the gist of it is, in my > application, it is possible that an action can call some external services > which fetch data from another action via another http call to the > application itself. (Basically a cyclic http call) > > It is by design and there is no other obvious way around it. > > To prevent a deadlock in production, I wanted to make sure that, there is > always a single thread available to run those certain action. Basically, I > want to dedicate one thread to run that action, and no other actions. > > Did you know how can I accomplish this? > > -- > 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 rubyonrails-talk+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/263cc035-170e-4c45-b5d7-f047662c8416%40googlegroups.com > . > -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOMcp-AqZeqKA_F1CuwLDvChS0AGF1%3DcLiii2arRqjz-0tWTSg%40mail.gmail.com.