plezi 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/plezi/common/redis.rb +6 -3
- data/lib/plezi/common/settings.rb +3 -1
- data/lib/plezi/handlers/controller_magic.rb +3 -1
- data/lib/plezi/version.rb +1 -1
- data/resources/environment.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f99a6c5363bfd4c55ae83bccdd950960f70e09b
|
4
|
+
data.tar.gz: 1efec6a2d073e2c10ecae857ffd762125dd5c5d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad3c84e4434609d30e7770f2fc2d4b6b698054439b52a9484ca8fd38cd8decb93fc8f5e8f3b51bcf79378ca752fb60369957994d966ee3b3abbd33cbe72f967c
|
7
|
+
data.tar.gz: 6c19c160e6791996b23bc09dcca988f44a462c6ede451f35be1b2946ef65f7b1be611bf1ec1abefa40bb113a5ce44934ac80bb5f915dde452f0f63cd6755fcdc
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,17 @@
|
|
2
2
|
|
3
3
|
***
|
4
4
|
|
5
|
+
Change log v.0.10.2
|
6
|
+
|
7
|
+
**Fix**: fixed an issue where the Redis connection couldn't broadcast due to limited acess to the controller's methods.
|
8
|
+
|
9
|
+
**Fix**: fixed an issue with the server's UUID being set before the GReactor's forking, thereby disabling Redis communications between processed over te same machine.
|
10
|
+
|
11
|
+
***
|
12
|
+
|
5
13
|
Change log v.0.10.1
|
6
14
|
|
7
|
-
**
|
15
|
+
**Fix**: fixed an issue where the new Controller's inner router might route to RESTful methods that weren't defined (:show, :save, etc').
|
8
16
|
|
9
17
|
**fix**: fixed an issue with the new Controller's inner router might not reset it's cache when methods are added to the controller after the service has begun.
|
10
18
|
|
data/lib/plezi/common/redis.rb
CHANGED
@@ -22,23 +22,26 @@ module Plezi
|
|
22
22
|
on.message do |channel, msg|
|
23
23
|
begin
|
24
24
|
data = YAML.load(msg)
|
25
|
-
next if data[:server] == Plezi::Settings
|
25
|
+
next if data[:server] == Plezi::Settings.uuid
|
26
26
|
if data[:target]
|
27
27
|
GRHttp::Base::WSHandler.unicast data[:target], data
|
28
28
|
else
|
29
29
|
GRHttp::Base::WSHandler.broadcast data
|
30
30
|
end
|
31
31
|
rescue => e
|
32
|
-
|
32
|
+
Reactor.error e
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
36
36
|
rescue => e
|
37
|
-
|
37
|
+
Reactor.error e
|
38
38
|
retry
|
39
39
|
end
|
40
40
|
end
|
41
41
|
@redis
|
42
|
+
rescue => e
|
43
|
+
Reactor.error e
|
44
|
+
false
|
42
45
|
end
|
43
46
|
end
|
44
47
|
|
@@ -323,6 +323,8 @@ module Plezi
|
|
323
323
|
(@inheritance ||= [].to_set) << sub
|
324
324
|
end
|
325
325
|
|
326
|
+
public
|
327
|
+
|
326
328
|
|
327
329
|
# WebSockets
|
328
330
|
|
@@ -339,7 +341,7 @@ module Plezi
|
|
339
341
|
|
340
342
|
def __inner_redis_broadcast data
|
341
343
|
conn = Plezi.redis_connection
|
342
|
-
data[:server] = Plezi::Settings
|
344
|
+
data[:server] = Plezi::Settings.uuid
|
343
345
|
return conn.publish( Plezi::Settings.redis_channel_name, data.to_yaml ) if conn
|
344
346
|
false
|
345
347
|
end
|
data/lib/plezi/version.rb
CHANGED
data/resources/environment.rb
CHANGED
@@ -23,8 +23,11 @@ Bundler.require(:default, ENV['ENV'].to_s.to_sym)
|
|
23
23
|
# require tilt/sass in a thread safe way (before multi-threading cycle begins)
|
24
24
|
require 'tilt/sass' if defined?(::Slim) && defined?(::Sass)
|
25
25
|
|
26
|
-
# set up Plezi logs - Heroku logs to STDOUT, this machine logs to log file
|
27
|
-
|
26
|
+
# set up Plezi's logs - Heroku logs to STDOUT, this machine logs to log file
|
27
|
+
GReactor.create_logger File.expand_path(File.join 'logs','server.log'), ENV["RACK_ENV"]=="development" unless ENV['DYNO']
|
28
|
+
|
29
|
+
## Allow forking? ONLY if your code is fully scalable across processes.
|
30
|
+
# GReactor.set_forking 4
|
28
31
|
|
29
32
|
# load all config files
|
30
33
|
Dir[File.join "{config}", "**" , "*.rb"].each {|file| load File.expand_path(file)}
|