Skip to content
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

Get is not truely threadsafe when using typhoeus #5

Open
carlallen opened this issue May 29, 2013 · 1 comment
Open

Get is not truely threadsafe when using typhoeus #5

carlallen opened this issue May 29, 2013 · 1 comment

Comments

@carlallen
Copy link

I ran into an issue where the get command was returning duplicates. I have a simple threaded app that reads from the queue and processes items.

The problem seems to be that if multiple threads request the same url from typheous before a response comes back it only makes one request and returns the response to all the requesting threads.

I was able to get around this by attaching a random value to the request params which will make each URL unique.

IronMQ::Client.new(...).queue(...).get(unique_name: SecureRandom.hex)

It might be nice to note in your readme that this behavior exists.

@treeder
Copy link
Contributor

treeder commented Jun 3, 2013

I'm surprised to hear that, but I posted an issue on Typhoeus board to find out more: typhoeus/typhoeus#301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants