{"action":"closed","issue":{"url":"https://api.github.com/repos/SMX-LTD/ccm-clj/issues/11","labels_url":"https://api.github.com/repos/SMX-LTD/ccm-clj/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/SMX-LTD/ccm-clj/issues/11/comments","events_url":"https://api.github.com/repos/SMX-LTD/ccm-clj/issues/11/events","html_url":"https://github.com/SMX-LTD/ccm-clj/issues/11","id":55713722,"number":11,"title":"Multiple projects and auto-cluster","user":{"login":"d-t-w","id":2832467,"avatar_url":"https://avatars.githubusercontent.com/u/2832467?v=3","gravatar_id":"","url":"https://api.github.com/users/d-t-w","html_url":"https://github.com/d-t-w","followers_url":"https://api.github.com/users/d-t-w/followers","following_url":"https://api.github.com/users/d-t-w/following{/other_user}","gists_url":"https://api.github.com/users/d-t-w/gists{/gist_id}","starred_url":"https://api.github.com/users/d-t-w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-t-w/subscriptions","organizations_url":"https://api.github.com/users/d-t-w/orgs","repos_url":"https://api.github.com/users/d-t-w/repos","events_url":"https://api.github.com/users/d-t-w/events{/privacy}","received_events_url":"https://api.github.com/users/d-t-w/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-28T04:40:35Z","updated_at":"2015-04-26T04:59:53Z","closed_at":"2015-04-26T04:59:53Z","body":"Auto-cluster restarts before switching cluster, so if I have two projects using auto-cluster and I move between them ccm/stop! won't work (old cluster is running, but current cluster has been switched) \r\n\r\nThis is easier to see if both projects use different keyspaces\r\n\r\ni.e.\r\n\r\n```clojure\r\n;; project1 uses keyspace1\r\n(ccm/auto-cluster! \"project1\" \"2.0.10\" 3\r\n                   {\"keyspace1\" [#\"schema/test-keyspace\\.cql\" #\"schema/schema\\.cql\"]}\r\n                   {:cql (get-in config [:cluster :port])})\r\n\r\n;; project2 uses keyspace2\r\n(ccm/auto-cluster! \"project2\" \"2.0.10\" 3\r\n                   {\"keyspace2\" [#\"schema/test-keyspace\\.cql\" #\"schema/schema\\.cql\"]}\r\n                   {:cql (get-in config [:cluster :port])})\r\n```\r\n\r\nRunning one, stopping it, running the other and then trying to connect to keyspace2 gives:\r\n\r\nCaused by: com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace 'keyspace2' does not exist\r\n\r\nBecause the cluster has actually been restarted as project1 (with keyspace1) probably from a save-point, but the current cluster is set to project2.\r\n\r\nI'll look into it and raise a PR soon."}}