{"action":"created","issue":{"url":"https://api.github.com/repos/jondot/sneakers/issues/344","repository_url":"https://api.github.com/repos/jondot/sneakers","labels_url":"https://api.github.com/repos/jondot/sneakers/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/jondot/sneakers/issues/344/comments","events_url":"https://api.github.com/repos/jondot/sneakers/issues/344/events","html_url":"https://github.com/jondot/sneakers/issues/344","id":301181936,"number":344,"title":"Worker doesn't closes the connection","user":{"login":"paulohtfs","id":5274022,"avatar_url":"https://avatars0.githubusercontent.com/u/5274022?v=4","gravatar_id":"","url":"https://api.github.com/users/paulohtfs","html_url":"https://github.com/paulohtfs","followers_url":"https://api.github.com/users/paulohtfs/followers","following_url":"https://api.github.com/users/paulohtfs/following{/other_user}","gists_url":"https://api.github.com/users/paulohtfs/gists{/gist_id}","starred_url":"https://api.github.com/users/paulohtfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulohtfs/subscriptions","organizations_url":"https://api.github.com/users/paulohtfs/orgs","repos_url":"https://api.github.com/users/paulohtfs/repos","events_url":"https://api.github.com/users/paulohtfs/events{/privacy}","received_events_url":"https://api.github.com/users/paulohtfs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T21:02:29Z","updated_at":"2018-03-01T13:47:35Z","closed_at":null,"author_association":"NONE","body":"Hi everyone,\r\nI'm having a problem with sneaker leaking connection with RabbitMQ. I look up and didn't find anything that resolve my problem (or at least every thing that I tried, didn't work).\r\n\r\nWhen my rails application worker consumes a message from the queue, it creates a connection on rabbitmq, but after finishing and sending the ack, the connection still open. That's happens with every message.\r\n\r\nMy worker is basically this:\r\n```ruby\r\nclass Worker\r\n  include Sneakers:Worker\r\n\r\n  from_queue 'test.queue',\r\n                      retry_routing_key: 'test.queue'\r\n                      arguments: { 'x-dead-letter-exchange': ENV['RETRY_EXCHANGE'] }\r\n\r\n  def work(message)\r\n    # do something\r\n    ack!\r\n  rescue => error\r\n    reject!\r\n  end\r\nend\r\n```\r\n\r\nThere is any settings to do close the connection after the worker finished?"},"comment":{"url":"https://api.github.com/repos/jondot/sneakers/issues/comments/369596248","html_url":"https://github.com/jondot/sneakers/issues/344#issuecomment-369596248","issue_url":"https://api.github.com/repos/jondot/sneakers/issues/344","id":369596248,"user":{"login":"paulohtfs","id":5274022,"avatar_url":"https://avatars0.githubusercontent.com/u/5274022?v=4","gravatar_id":"","url":"https://api.github.com/users/paulohtfs","html_url":"https://github.com/paulohtfs","followers_url":"https://api.github.com/users/paulohtfs/followers","following_url":"https://api.github.com/users/paulohtfs/following{/other_user}","gists_url":"https://api.github.com/users/paulohtfs/gists{/gist_id}","starred_url":"https://api.github.com/users/paulohtfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulohtfs/subscriptions","organizations_url":"https://api.github.com/users/paulohtfs/orgs","repos_url":"https://api.github.com/users/paulohtfs/repos","events_url":"https://api.github.com/users/paulohtfs/events{/privacy}","received_events_url":"https://api.github.com/users/paulohtfs/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T13:47:35Z","updated_at":"2018-03-01T13:47:35Z","author_association":"NONE","body":"@Spaceghost thanks for the answer.\r\n\r\nI still don't understand the relation between the PR and the `stop` method.\r\nWhere should I call `stop`?"}}
{"actor":{"display_login":"paulohtfs"}}