iron-io / iron_mq_ruby

Ruby library for IronMQ.
http://www.iron.io
BSD 2-Clause "Simplified" License
35 stars 17 forks source link

Get does not give access to status of message. #76

Closed Stephenitis closed 8 years ago

Stephenitis commented 10 years ago

correct me if i'm wrong here.

I'm not seeing a GET message by ID return the status of the message the request body comes back with advanced rest client application 2014-07-02 15-27-18 2014-07-02 15-27-21

This is the Message Object I'm seeing.

=> #<IronMQ::Message:0x007f88a39e7158
 @code=200,
 @queue=
  #<IronMQ::Queue:0x000000000000
   @client=
    #<IronMQ::Client:0x000000000000
     @api_version=1,
     @base_url=
      "https://mq-aws-us-east-1.iron.io:443/1/projects/0x000000000000/queues",
     @content_type="application/json",
     @env=nil,
     @host="mq-aws-us-east-1.iron.io",
     @logger=
      #<Logger:0x007f88a60a4ed0
       @default_formatter=
        #<Logger::Formatter:0x007f88a60a4e08 @datetime_format=nil>,
       @formatter=nil,
       @level=1,
       @logdev=
        #<Logger::LogDevice:0x007f88a60a4db8
         @dev=#<IO:<STDOUT>>,
         @filename=nil,
         @mutex=
          #<Logger::LogDevice::LogDeviceMutex:0x007f88a60a4cc8
           @mon_count=0,
           @mon_mutex=#<Mutex:0x007f88a60a49d0>,
           @mon_owner=nil>,
         @shift_age=nil,
         @shift_size=nil>,
       @progname=nil>,
     @options_list=
      [:scheme,
       :host,
       :port,
       :user_agent,
       :http_gem,
       :project_id,
       :token,
       :api_version],
     @port=443,
     @project_id="0x000000000000",
     @rest=
      #<Rest::Client:0x007f88a6171f20
       @gem=:typhoeus,
       @logger=
        #<Logger:0x007f88a60a0880
         @default_formatter=
          #<Logger::Formatter:0x007f88a60a0830 @datetime_format=nil>,
         @formatter=nil,
         @level=1,
         @logdev=
          #<Logger::LogDevice:0x007f88a60a0740
           @dev=#<IO:<STDOUT>>,
           @filename=nil,
           @mutex=
            #<Logger::LogDevice::LogDeviceMutex:0x007f88a60a06c8
             @mon_count=0,
             @mon_mutex=#<Mutex:0x007f88a60a0678>,
             @mon_owner=nil>,
           @shift_age=nil,
           @shift_size=nil>,
         @progname=nil>,
       @options={:gem=>nil},
       @wrapper=#<Rest::Wrappers::TyphoeusWrapper:0x007f88a60a5088>>,
     @scheme="https",
     @token="0x000000000000",
     @user_agent="iron_mq_ruby-5.0.1 (iron_core_ruby-1.0.4)">,
   @name="TESTINGGET">,
 @raw={"id"=>"6031592710564840241"}>

version 5.0.1

Stephenitis commented 10 years ago

ehhh nevermind I didn't realize that .get was aliased to .get_messages

 def get_messages(options = {})
      if options.is_a?(String)
        # assume it's an id
        # ISSUE # 76 problem response is not passed to the message in this method.
        return Message.new(self, {"id" => options})
      end

      resp = call_api_and_parse_response(:get, "/messages", options, false)

      process_messages(resp["messages"], options)
    end
Stephenitis commented 10 years ago

created a pull request to add the response body for a single message from queue.get("message_id") previously it was not returned. https://github.com/iron-io/iron_mq_ruby/pull/77

rdallman commented 8 years ago

/wave @Stephenitis is this resolved via v3 (as follows #77 ) ?