GithubHelp home page GithubHelp logo

iron_core_ruby's Introduction

iron_core_ruby's People

Contributors

iced avatar manveru avatar nicksardo avatar pyeremenko avatar rkononov avatar romand avatar sunloverz avatar thousandsofthem avatar treeder avatar vasilev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iron_core_ruby's Issues

File.expand_path() dies with "non-absolute home"

from inside a rails app, i do

IronMQ::Client.new.queue 'hello'

i get

/home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:114:in `expand_path': non-absolute home (ArgumentError)
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:114:in `load_from_config'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:60:in `block (3 levels) in initialize'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:55:in `each'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:55:in `block (2 levels) in initialize'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:54:in `each'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:54:in `block in initialize'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:53:in `each'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_core-1.0.3/lib/iron_core/client.rb:53:in `initialize'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/iron_mq-5.0.1/lib/iron_mq/client.rb:21:in `initialize'
        from /vagrant/leo/app/workers/message_puller.rb:7:in `new'
        from /vagrant/leo/app/workers/message_puller.rb:7:in `initialize'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/runner.rb:62:in `new'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/runner.rb:62:in `<top (required)>'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/runner.rb:62:in `eval'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/runner.rb:62:in `<top (required)>'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:128:in `require'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:128:in `require_command!'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:95:in `runner'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from /home/vagrant/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Get is not truely threadsafe when using typhoeus

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.

Add PUT method to client.



    def put(method, params={})
      request_hash = {}
      request_hash[:headers] = common_request_hash
      request_hash[:body] = params.to_json

      IronCore::Logger.debug 'IronCore', "PUT #{url + method} with params='#{request_hash.to_s}'"

      @rest.put(url + method, request_hash)
    end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.