tamashii-manager 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac1ebd7c889445d0d94b3decf760092788a707cb
|
4
|
+
data.tar.gz: 92f09efb05a13bfc46dc6e55fc8d2f9efe5fc125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ce54569eb0eabd4912bcba34330596b46fae9a737ce10b3e93cae0ec31795796eddffda0b845108c505f8631bf7ec63044d04de4b88e19359e45cd869cccd4
|
7
|
+
data.tar.gz: dbd23546a08693da78e344a3611e9b29d704246af71bea6d1a8fbb1b54307b26e27cb039e69702a6f99a986530d61f2b20fba4eb903666aa6e2d3f7583bb76f3
|
@@ -29,6 +29,12 @@ module Tamashii
|
|
29
29
|
def send_to(id, packet)
|
30
30
|
Manager.server.pubsub.send_to(id, packet)
|
31
31
|
end
|
32
|
+
|
33
|
+
def ensure_heartbeat_enabled(event_loop)
|
34
|
+
@heartbeat_timer = event_loop.timer(Config.heartbeat_interval) do
|
35
|
+
event_loop.post { accepted_clients.values.map(&:beat) }
|
36
|
+
end
|
37
|
+
end
|
32
38
|
end
|
33
39
|
end
|
34
40
|
end
|
@@ -9,22 +9,10 @@ module Tamashii
|
|
9
9
|
module Manager
|
10
10
|
# :nodoc:
|
11
11
|
class Server < Tamashii::Server::Base
|
12
|
-
def initialize
|
13
|
-
super
|
14
|
-
setup_heartbeat_timer
|
15
|
-
end
|
16
|
-
|
17
12
|
def call(env)
|
18
13
|
super
|
19
14
|
end
|
20
15
|
|
21
|
-
# NOTE: Move into Tamashii::Server maybe better
|
22
|
-
def setup_heartbeat_timer
|
23
|
-
@heartbeat_timer = @event_loop.timer(Config.heartbeat_interval) do
|
24
|
-
@event_loop.post { Client.accepted_clients.values.map(&:beat) }
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
16
|
def inspect
|
29
17
|
"Tamashii::Manager::Server v#{VERSION}"
|
30
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tamashii-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 蒼時弦也
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-10-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: puma
|