I have a rails app that has the ability to export data to excel. The
problem is that the report is very bug, so I need a way to reduce the
waiting time of my clients.
My thought was, lunch some threads… but… is it safe in rails?
I have a rails app that has the ability to export data to excel. The
problem is that the report is very bug, so I need a way to reduce the
waiting time of my clients.
My thought was, lunch some threads… but… is it safe in rails?
Thanks
Pedro C.
Nope. It is unsafe in rails. You should look into backgroundrb
instead. It is very simple, you just need to create the proper worker
tasks and start the worker tasks using Middleman. You may want to start
the worker in background.
I have a rails app that has the ability to export data to excel. The
problem is that the report is very bug, so I need a way to reduce the
waiting time of my clients.
My thought was, lunch some threads… but… is it safe in rails?
Thanks
Pedro C.
Nope. It is unsafe in rails. You should look into backgroundrb
instead. It is very simple, you just need to create the proper worker
tasks and start the worker tasks using Middleman. You may want to start
the worker in background.
I have a rails app that has the ability to export data to excel. The
problem is that the report is very bug, so I need a way to reduce the
waiting time of my clients.
My thought was, lunch some threads… but… is it safe in rails?
I have a rails app that has the ability to export data to excel. The
problem is that the report is very bug, so I need a way to reduce the
waiting time of my clients.
My thought was, lunch some threads… but… is it safe in rails?
You might look into backgrounddrb… you could pass off the generating
of
the report to it and then have it update a flag in the database that the
report is ready or send an email to the user with the url to download
it…
Sorry I don’t have more details. I haven’t yet worked with this
myself. Maybe someone else can fill in the gaps in my knowledge.
What I’m interested in would be that when you send the task to
BackgrounDRb process and you request-response cycle ends, how do you
then provided feedback to the using that the process is complete? Is
it possible to use AJAX to poll the long process for it’s status, or
does the BackgroundDRb provide feedback in some form of callback
mechanism?
I’m guessing the answers to these questions become obvious when
working with BackgrounDRb, but I just don’t have those answers for you
at this time.