[Backgroundrb-devel] Problem with blocking workers
Marc at SoftwareHackery.Com
Tue Apr 3 11:21:18 EDT 2007
On Tue, 3 Apr 2007, Christian Schlaefcke wrote:
> Hi Folks,
> I found this thread
> on this mailing list that describes pretty much the same behaviour that I
> experience as well.
> My problem is, that I have no chance for putting a "sleep 0" in an
> iteration because I have no Iteration.
> What I´m doing is executing a stored procedure in a sybase db that could
> take from few seconds up to hours to complete. The stored procedure gets
> executed and spools the result to another table where the user could
> access it later. So in my worker I don´t actually iterate over the results
> instead it waits until the stored procedure has finished.
> I need to get different jobs with different execution times executed at
> the same time. This is how I understand concurrency.
> How could I solve my problem? Are concurrent tasks possible anyway?
> Thanks & Regards,
> Christian Schlaefcke
Based on my experiences, you will have a difficult time doing what you
want to do, at least if trying to use backgroundrb. If I were attacking
this problem, I probably would use a far less elegant approach, that being
to fork a new child in which the query is run.
Hopefully, others on this list have a better suggestion than I do...
More information about the Backgroundrb-devel