-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Easypost.api_key is not threadsafe #183
Comments
Here is how ActiveResource deals with threadsafe class attributes. |
Thank you for opening this issue and providing the documentation link. We are aware about the lack of thread-safety in our client libraries, and are actively working to rectify this. |
Here's how I patch the code, for now, to make it threadsafe. Hope it helps. EasyPost.module_eval do
class << self
include ThreadsafeAttributes
threadsafe_attribute :api_key
end
end |
Wanted to provide an update, we're beginning the work for a new major release (v5) of this library that will contain a new |
We will be releasing v5.0.0 which is a thread-safe rewrite of this library within the next couple hours. We'd encourage anyone who needs thread-safety to upgrade. |
Software Version
4.0.3
Language Version
3.0.3
Operating System
mac os monterey
What happened?
The Easypost.api_key attribute is not threadsafe.
Running the code below in a rails console can easily show that the attribute is not threadsafe.
What was expected?
EasyPost.api_key
should be threadsafe since I believe that a lot of Rails app is running on puma with a multi-thread setup.Sample Code
No response
Relevant logs
No response
The text was updated successfully, but these errors were encountered: