lib/peek/adapters/elasticsearch.rb in peek-1.0.1 vs lib/peek/adapters/elasticsearch.rb in peek-1.1.0

- old
+ new

@@ -16,13 +16,15 @@ result.to_json rescue ::Elasticsearch::Transport::Transport::Errors::NotFound # pass end - def save + def save(request_id) + return false if request_id.blank? + @client.index index: @index, type: @type, - id: "#{Peek.request_id}", + id: "#{request_id}", body: Peek.results.to_json, ttl: @expires_in rescue ::Elasticsearch::Transport::Transport::Errors::BadRequest false end