Skip to content

Instantly share code, notes, and snippets.

@klizhentas
Created July 12, 2014 01:09
Show Gist options
  • Save klizhentas/819787257c5fa7b59d11 to your computer and use it in GitHub Desktop.
Save klizhentas/819787257c5fa7b59d11 to your computer and use it in GitHub Desktop.
worker3.dfw.definbox.com [2014-07-12T00:18:36+00:00] WARN: Current package[libpcre3-dev]: /var/chef/cache/cookbooks/mgnginx/recipes/default.rb:14:in `from_file'
worker3.dfw.definbox.com [2014-07-12T00:18:36+00:00] INFO: HTTP Request Returned 404 Not Found: No routes match the request: /search/node
worker3.dfw.definbox.com
worker3.dfw.definbox.com ================================================================================
worker3.dfw.definbox.com Recipe Compile Error in /var/chef/cache/cookbooks/etcd/recipes/cluster.rb
worker3.dfw.definbox.com ================================================================================
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com Net::HTTPServerException
worker3.dfw.definbox.com ------------------------
worker3.dfw.definbox.com 404 "Not Found"
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com Cookbook Trace:
worker3.dfw.definbox.com ---------------
worker3.dfw.definbox.com /var/chef/cache/cookbooks/partial_search/libraries/partial_search.rb:49:in `search'
worker3.dfw.definbox.com /var/chef/cache/cookbooks/partial_search/libraries/partial_search.rb:142:in `partial_search'
worker3.dfw.definbox.com /var/chef/cache/cookbooks/etcd/recipes/cluster.rb:54:in `from_file'
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com Relevant File Content:
worker3.dfw.definbox.com ----------------------
worker3.dfw.definbox.com /var/chef/cache/cookbooks/partial_search/libraries/partial_search.rb:
worker3.dfw.definbox.com
worker3.dfw.definbox.com 42: raise ArgumentError, "Type must be a string or a symbol!" unless (type.kind_of?(String) || type.kind_of?(Symbol))
worker3.dfw.definbox.com 43:
worker3.dfw.definbox.com 44: sort = args.include?(:sort) ? args[:sort] : 'X_CHEF_id_CHEF_X asc'
worker3.dfw.definbox.com 45: start = args.include?(:start) ? args[:start] : 0
worker3.dfw.definbox.com 46: rows = args.include?(:rows) ? args[:rows] : 1000
worker3.dfw.definbox.com 47: query_string = "search/#{type}?q=#{escape(query)}&sort=#{escape(sort)}&start=#{escape(start)}&rows=#{escape(rows)}"
worker3.dfw.definbox.com 48: if args[:keys]
worker3.dfw.definbox.com 49>> response = @rest.post_rest(query_string, args[:keys])
worker3.dfw.definbox.com 50: response_rows = response['rows'].map { |row| row['data'] }
worker3.dfw.definbox.com 51: else
worker3.dfw.definbox.com 52: response = @rest.get_rest(query_string)
worker3.dfw.definbox.com 53: response_rows = response['rows']
worker3.dfw.definbox.com 54: end
worker3.dfw.definbox.com 55: if block
worker3.dfw.definbox.com 56: response_rows.each { |o| block.call(o) unless o.nil?}
worker3.dfw.definbox.com 57: unless (response["start"] + response_rows.length) >= response["total"]
worker3.dfw.definbox.com 58: nstart = response["start"] + rows
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com Running handlers:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment