copycopter / copycopter-ruby-client

Edit copy in your live web app.
http://copycopter.com
MIT License
177 stars 56 forks source link

copycopter_client causes rails to hang when daemonized #34

Open ressu opened 12 years ago

ressu commented 12 years ago

After I added copycopter_client to my rails application, I noticed an interesting side-effect.

The rails process doesn't start properly unless it's slowed down a bit after CopycopterClient.configure. Just adding sleep 2 after configuration allows rails to start normally.

The logs can easily be used to identify when the problem occurs. Without the sleep clause "Downloaded translations" message doesn't appear in the log and rails doesn't respond at all.

I currently don't have anything to go on to further debug this issue.

My copycopter initializer contains:

     CopycopterClient.configure do |config|
       config.api_key = 'mykey'
       config.host = 'my-copycopter.herokuapp.com'
     end
     sleep 1

This issue is seen with rails 3.2.6 and ruby 1.9.3