rgossip2 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,7 +67,8 @@ module RGossip2
67
67
  dest = @node_list.choose_except(@self_node)
68
68
  return unless dest # ないとは思うけど…
69
69
 
70
- debug("Data is transmitted: address=#{dest.address}")
70
+ # 意図的にコメントアウト
71
+ #debug("Data is transmitted: address=#{dest.address}")
71
72
 
72
73
  # チャンクに分けてデータを送信
73
74
  @node_list.serialize.each do |chunk|
@@ -65,7 +65,8 @@ module RGossip2
65
65
  return unless select([sock], [], [], @context.receive_timeout)
66
66
  message, (afam, port, host, ip) = sock.recvfrom(@context.buffer_size * @context.allowance)
67
67
 
68
- debug("Data was received: from=#{ip}")
68
+ # 意図的にコメントアウト
69
+ #debug("Data was received: from=#{ip}")
69
70
 
70
71
  recv_nodes = unpack_message(message)
71
72
 
@@ -75,7 +76,9 @@ module RGossip2
75
76
  }
76
77
  else
77
78
  # データが取得できなかった場合は無効なデータとして処理
78
- debug("Invalid data was received: from=#{ip}")
79
+
80
+ # 意図的にコメントアウト
81
+ #debug("Invalid data was received: from=#{ip}")
79
82
  end
80
83
  rescue Exception => e
81
84
  handle_error(e)
@@ -104,7 +107,8 @@ module RGossip2
104
107
  # 受信したNodeのタイムスタンプが新しければ
105
108
  # 持っているNodeを更新
106
109
  if timestamp > node.timestamp
107
- debug("The node was updated: address=#{address} timestamp=#{timestamp}")
110
+ # 意図的にコメントアウト
111
+ #debug("The node was updated: address=#{address} timestamp=#{timestamp}")
108
112
 
109
113
  node.timestamp = timestamp
110
114
  node.data = data
@@ -118,7 +122,8 @@ module RGossip2
118
122
  # 受信したNodeのタイムスタンプが新しければ
119
123
  # デッドリストのノードを復活させる
120
124
  if timestamp > node.timestamp
121
- debug("Node revived: address=#{address} timestamp=#{timestamp}")
125
+ # 意図的にコメントアウト
126
+ #debug("Node revived: address=#{address} timestamp=#{timestamp}")
122
127
 
123
128
  @dead_list.delete(address)
124
129
  @node_list[address] = node
@@ -129,7 +134,9 @@ module RGossip2
129
134
  }
130
135
  else
131
136
  # リストにない場合はNodeを追加
132
- debug("Node was added: address=#{address} timestamp=#{timestamp}")
137
+
138
+ # 意図的にコメントアウト
139
+ #debug("Node was added: address=#{address} timestamp=#{timestamp}")
133
140
 
134
141
  node = create(Node, @node_list, @dead_list, address, data, timestamp)
135
142
  @node_list[address] = node
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgossip2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - winebarrel