> ActiveRecord::Base.allow_concurrency = true
> That did the trick.  We had multiple jobs/threads using ActiveRecord.

Just for the archives: apart from ActiveRecord::Base.allow_concurrency I
also explicitly needed to add some Mutex things to code using Net::HTTP
(to be more precise: OAuth), when executed by rufus-scheduler. Though I
was only using a single instance of the scheduler, my workflow
application also uses the same code. When an application user would
trigger this code while the scheduler was also running it, I happily
found the following in the log, making me realise I forgot about thread
safety:

Processing TaskController#update 
...
Net::HTTPBadResponse (wrong status line: "e_end>2037-12-31
00:00:00</pub_date_end>"):
    /usr/local/lib/ruby/1.8/net/http.rb:2031:in `read_status_line'
    /usr/local/lib/ruby/1.8/net/http.rb:2018:in `read_new'
    /usr/local/lib/ruby/1.8/net/http.rb:1059:in `request'
 
/usr/local/lib/ruby/gems/1.8/gems/oauth-0.2.4/lib/oauth/consumer.rb:101:
in `request'
 
/usr/local/lib/ruby/gems/1.8/gems/oauth-0.2.4/lib/oauth/token.rb:44:in
`request'
 
/usr/local/lib/ruby/gems/1.8/gems/oauth-0.2.4/lib/oauth/token.rb:79:in
`get'

Not caused by rufus-scheduler, of course!

Arjan.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to