Permalink
Browse files

Update to chat correctly with the client

  • Loading branch information...
1 parent 4205220 commit 4314750711418fa8f77dde39b7c8811151bd98ff @richo committed Mar 23, 2012
Showing with 4 additions and 6 deletions.
  1. +1 −1 lib/oauth_proxy.rb
  2. +3 −5 lib/worker.rb
View
@@ -27,7 +27,7 @@ class App < Sinatra::Base
halt 404, "Slug not found"
end
- OauthProxy.callbacks[params['slug']].q.enq :done
+ OauthProxy.callbacks[params['slug']].q.enq params['code']
end
get '/' do
View
@@ -14,12 +14,10 @@ def run
def handle(s)
req = Request.new
id = ::OauthProxy.remember(req)
- s.puts("#{id} Added to queue")
+ s.puts(id)
# Bind until we're done here- work out how to poll effciently
- req.q.deq
- s.puts("#{id} Processed")
- #
- # In the webapp we call req.q.enq :status
+ ret = req.q.deq
+ s.puts(ret)
ensure
::OauthProxy.forget(id)
s.close

0 comments on commit 4314750

Please sign in to comment.