How do I start basic asynchronous work in sinatra?

I want to run a basic asynchronous job

exec('curl -0 '+url)

      

from sinatra app,

I tried to do it with a fork and detach, but it seems to be bogus.

(I'm on the windows)

0


a source to share


3 answers


and a sample app from Blake Mizerany on Github: sinatra-dj using DelayedJob as quering engine.



+3


a source


How about trying:



exec('curl -0'+url) if fork == nil

      

+1


a source


Old question, but ...

Use Spork

0


a source







All Articles