chriswarren / desk

A Ruby wrapper for the Desk.com V2 REST API
MIT License
66 stars 80 forks source link

Problem with the Thread.current in the Configuration #66

Open theDisco opened 8 years ago

theDisco commented 8 years ago

We are using the gem in a rails application and since we have switched from Unicorn to Passenger we have noticed that our desk integration stopped working. We've pinned down the problem to the Desk::Configuration module where you assign the config values to the Thread.current. Do you have a reason to do so? If yes how can you overcome the limitations of using your gem in a multithreaded application?

jonahwh commented 5 years ago

We ran into this same issue when using Sidekiq. The Sidekiq threads don't get the config specified in our initializer. As a temporary workaround we just configured desk inside of our Sidekiq workers...