cassandra_migrations 0.0.1.pre2 → 0.0.1.pre3
Sign up to get free protection for your applications and to get access to all the features.
@@ -23,13 +23,19 @@ module CassandraMigrations::Cassandra
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
def self.restart!
|
27
|
+
self.client = nil
|
28
|
+
self.config = nil
|
29
|
+
start!
|
30
|
+
end
|
31
|
+
|
26
32
|
def self.shutdown!
|
27
33
|
if client
|
28
34
|
client.close
|
29
35
|
self.client = nil
|
30
36
|
end
|
31
37
|
|
32
|
-
self.config = nil
|
38
|
+
self.config = nil
|
33
39
|
end
|
34
40
|
|
35
41
|
def self.create_keyspace!
|
@@ -9,9 +9,9 @@
|
|
9
9
|
if defined?(PhusionPassenger)
|
10
10
|
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
11
11
|
if forked
|
12
|
-
CassandraMigrations::Cassandra.
|
12
|
+
CassandraMigrations::Cassandra.restart!
|
13
13
|
end
|
14
14
|
end
|
15
|
+
else
|
16
|
+
CassandraMigrations::Cassandra.start!
|
15
17
|
end
|
16
|
-
|
17
|
-
CassandraMigrations::Cassandra.start!
|