{"action":"closed","issue":{"url":"https://api.github.com/repos/benningm/mtpolicyd/issues/18","repository_url":"https://api.github.com/repos/benningm/mtpolicyd","labels_url":"https://api.github.com/repos/benningm/mtpolicyd/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/benningm/mtpolicyd/issues/18/comments","events_url":"https://api.github.com/repos/benningm/mtpolicyd/issues/18/events","html_url":"https://github.com/benningm/mtpolicyd/issues/18","id":170157162,"number":18,"title":"2.01 Multiple Connections of same type","user":{"login":"LuckyFellow","id":20767692,"avatar_url":"https://avatars.githubusercontent.com/u/20767692?v=3","gravatar_id":"","url":"https://api.github.com/users/LuckyFellow","html_url":"https://github.com/LuckyFellow","followers_url":"https://api.github.com/users/LuckyFellow/followers","following_url":"https://api.github.com/users/LuckyFellow/following{/other_user}","gists_url":"https://api.github.com/users/LuckyFellow/gists{/gist_id}","starred_url":"https://api.github.com/users/LuckyFellow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuckyFellow/subscriptions","organizations_url":"https://api.github.com/users/LuckyFellow/orgs","repos_url":"https://api.github.com/users/LuckyFellow/repos","events_url":"https://api.github.com/users/LuckyFellow/events{/privacy}","received_events_url":"https://api.github.com/users/LuckyFellow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-09T12:47:58Z","updated_at":"2016-08-09T14:07:09Z","closed_at":"2016-08-09T14:07:09Z","body":"it seems like it is not possible to have different connections of the same type. Though no error is issued but within plugins it is not possible to specify which connection to utilize.\r\n\r\nUsecase is to have two different Redis instances. One is pure volatile the other is persistent with data written to disk.\r\n\r\nExample \"Connection\" configuration:\r\n\r\n```\r\n<Connection redisVolatile>\r\n  module = \"Redis\"\r\n  servers = \"127.0.0.1:6379\"\r\n</Connection>\r\n\r\n<Connection redisPersistent>\r\n  module = \"Redis\"\r\n  servers = \"127.0.0.1:6380\"\r\n</Connection>\r\n\r\n```\r\n\r\nWhen accessing a redis connection inside of a plugin, there is always the same connection returned.\r\nFor example:\r\n\r\n```\r\nwith 'Mail::MtPolicyd::Role::Connection' => {\r\n  name => 'redisPersistent',\r\n  type => 'Redis',\r\n};\r\n```\r\n\r\nreturns the same Redis connection as:\r\n\r\n```\r\nwith 'Mail::MtPolicyd::Role::Connection' => {\r\n  name => 'redisVolatile',\r\n  type => 'Redis',\r\n};\r\n```\r\n\r\nThough my expected result is that the corresponding, named connection redisPersistent is returned in the first example and redisVolatile in the second.\r\n"}}
{"actor":{"display_login":"LuckyFellow"}}