I'd completely missed that content-type was set to "Content-Type". :)
On 13 February 2011 16:40, Martin Hilbig <[email protected]> wrote: > hi, > > On 13.02.2011 16:55, Amine BENHAMZA wrote: >> >> Hello Guys, >> >> I'm working to launch an external process (ruby script) from couchdb. Half >> the time, I have this error : "error":"{noproc,{gen_server,call, (i omit >> the >> rest). The full log is here : https://gist.github.com/824762 >> >> I'm launching the external process this way : >> http://127.0.0.1:5984/trends_monitoring3/_rts >> >> The code I'm running aims to add a Job to Resque queue ( >> https://github.com/defunkt/resque) as done below : >> >> STDOUT.puts "{" + '"code":200' + "," + >> '"headers":{"Content-Type":"Content-Type"}' + "," + '"json":{}' + "}" > > i don't know whether this is a problem, but are you sure to set a > Content-Type header with value Content-Type not application/json? but then > you send a json body, i think you can simple omit the header. > > on the other hand your log suggests, that the caller expects text/html/xml > but not json, so maybe you want to change the "json":{} to "body":"". > > the last point: this script exits after it handled one request right? but > couchdb expects the _external to continue running and handlich more > requests, so you should put some loop around your code. > > others maybe would also suggest to use the _changes api instead ;) > > have fun > martin > >> module Demo >> Resque.enqueue(Job, params) >> end >> >> STDOUT.flush >> >> Did someone face this issue ? Have you any idea about what could cause >> this >> ? >> >> Thanks >> >> Amine. >> >
