zencoder/zencoder-fetcher

fetcher doesn't post the same way that the live notification system does

Closed this issue · 7 comments

The fetch breaks the notification down into proper URL parameters for a rails app, the production notifier does not.

From my Rails app logs:

Development via zencoder_fetcher:


Processing EndpointsController#zencoder (for 127.0.0.1 at 2010-07-11 18:57:58) [
POST]
Parameters: {"action"=>"zencoder", "id"=>"4e6ce2ea2db9cd20da08d77d9484b7af2cec
92f6", "output"=>{"label"=>nil, "url"=>"http://s3.amazonaws.com/shotrunner-zc-dr
opoff/development/4e6ce2ea2db9cd20da08d77d9484b7af2cec92f6.mp4", "id"=>148110, "
state"=>"finished"}, "job"=>{"id"=>121968, "test"=>true, "state"=>"finished"}, "
controller"=>"endpoints"}

Production:


Processing EndpointsController#zencoder (for 204.236.197.69 at 2010-07-11 23:08:24) [POST]
Parameters: {"{"job":{"test":true,"state":"finished","id":121948},"output":{"label":null,"url":"http://s3.amazonaws.com/shotrunner-zc-dropoff/rc/7297df78b6c95b5fa97fb53971973c1b40212b85.mp4\",\"state\":\"finished\",\"id\":148090}}"=>nil, "action"=>"zencoder", "id"=>"7297df78b6c95b5fa97fb53971973c1b40212b85", "controller"=>"endpoints"}

If I JSON.parse() the rack.request.form_vars, it works fine. I'd love for the production system to work like the fetcher gem, but ideally they'd both work the same.

Let me know if you need more info/examples.

-jon

Thanks for the info Jon. I'll take a look.

Jon, are you using the most recent version of Fetcher?

Uh, maybe?

jmoses@theshiny:~/dev/geezeo/geezeo/vendor/plugins/symitar$ gem list --local zencoder

*** LOCAL GEMS ***

zencoder (2.0.0)
zencoder-fetcher (0.1.6)

whups, I guess not. I'll see if I can reproduce this with the updated gem.

Get the most recent fetcher - 0.1.7. I think that'll make things work better for you.

If you're still having issues, let me know.

Chris - I'm still seeing the same issue.

jmoses@theshiny:~$ zencoder_fetcher -u http://fxs2.localhost:3001/endpoints/zencoder/42e167bfbe4a048e32914165a4aadbd6d769a265 -j 121979 xxxxxxxxxxx
1 notifications retrieved and posted to http://fxs2.localhost:3001/endpoints/zencoder/42e167bfbe4a048e32914165a4aadbd6d769a265

Processing EndpointsController#zencoder (for 127.0.0.1 at 2010-07-16 18:38:18) [POST]
Parameters: {"action"=>"zencoder", "id"=>"42e167bfbe4a048e32914165a4aadbd6d769a265", "output"=>{"label"=>nil, "url"=>"http://s3.amazonaws.com/shotrunner-zc-dropoff/development/42e167bfbe4a048e32914165a4aadbd6d769a265.mp4", "id"=>157666, "state"=>"finished"}, "job"=>{"id"=>130787, "test"=>true, "state"=>"finished"}, "controller"=>"endpoints"}

That's from my local environment. The live site (feature in beta) still receives the data as outline above.

Thanks,
-jon

This makes my app work with both, but it's obviously not a good solution:

    zc_output = Rails.env.development? ? params : JSON.parse( request.env['rack.request.form_vars'] )