teakflake 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +1 -1
- data/lib/teakflake/server.rb +5 -1
- data/lib/teakflake/version.rb +1 -1
- data/lib/teakflake/worker_id_sources/static_worker_id.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3edd1c6605bf85fafe0056fab97bfb96dbc65fa12cbfe94766c021661f7a7178
|
|
4
|
+
data.tar.gz: 6affc078e11e971a7113e74b63752ff496247408e704a43b7bc1c27663d53d05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7cd62bf474275be49cd3cb6db053679cef34c3884eb6f4678e93ad9affe2b4bc888779eba5feb3344933f8f9cdae0e999513a43fefaf08161ed13f2f6623261
|
|
7
|
+
data.tar.gz: 9155ee5109391584a1853c097eae9bc5ecc047f51828889481f17eed794b953da9070a81809a67bea4a25a5d4d97f058d26c842b6794e797ac106dc45a0ee927
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 0.1.3
|
|
2
|
+
|
|
3
|
+
ENHANCEMENTS:
|
|
4
|
+
|
|
5
|
+
* Log on server error
|
|
6
|
+
|
|
7
|
+
## 0.1.2
|
|
8
|
+
|
|
9
|
+
BUG FIXES:
|
|
10
|
+
|
|
11
|
+
* Fixed missing require in teakflake/worker_id_sources/static_worker_id
|
|
12
|
+
|
|
13
|
+
## 0.1.1
|
|
14
|
+
|
|
15
|
+
BUG FIXES:
|
|
16
|
+
|
|
17
|
+
* Fixed missing/spurious requires in teakflake/server
|
|
18
|
+
* Fixed sanity checking peers for StaticWorkerId
|
|
19
|
+
|
|
1
20
|
## 0.1.0
|
|
2
21
|
|
|
3
22
|
Initial Release.
|
data/Gemfile.lock
CHANGED
data/lib/teakflake/server.rb
CHANGED
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
# See the License for the specific language governing permissions and
|
|
15
15
|
# limitations under the License.
|
|
16
16
|
|
|
17
|
+
require 'json'
|
|
18
|
+
require 'zk'
|
|
17
19
|
require 'yaml'
|
|
18
20
|
require 'securerandom'
|
|
19
|
-
require 'rack/request'
|
|
20
21
|
require_relative 'clocks/process'
|
|
21
22
|
require_relative 'worker_id_sources/static_worker_id'
|
|
22
23
|
require_relative 'id_worker'
|
|
@@ -36,6 +37,8 @@ module Teakflake
|
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
class Server
|
|
40
|
+
include LogsForMyFamily::LocalLogger
|
|
41
|
+
|
|
39
42
|
def config
|
|
40
43
|
@config ||= {}.freeze
|
|
41
44
|
end
|
|
@@ -145,6 +148,7 @@ module Teakflake
|
|
|
145
148
|
}, response: { ids: ids }})
|
|
146
149
|
]]
|
|
147
150
|
rescue StandardError => exc
|
|
151
|
+
logger.error(:server_error, message: exc.message)
|
|
148
152
|
[500, { 'Content-Type' => 'application/json' }, [
|
|
149
153
|
JSON.generate({metadata: {
|
|
150
154
|
requestId: request_id,
|
data/lib/teakflake/version.rb
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# See the License for the specific language governing permissions and
|
|
15
15
|
# limitations under the License.
|
|
16
16
|
|
|
17
|
+
require 'net/http'
|
|
17
18
|
require 'logsformyfamily'
|
|
18
19
|
|
|
19
20
|
module Teakflake
|
|
@@ -112,7 +113,7 @@ module Teakflake
|
|
|
112
113
|
children = @zookeeper.children(@worker_id_zk_path)
|
|
113
114
|
peers = children.each_with_object({}) do |child, hash|
|
|
114
115
|
info = @zookeeper.get("#{@worker_id_zk_path}/#{child}")
|
|
115
|
-
hash[child.to_i] = info
|
|
116
|
+
hash[child.to_i] = info[0]
|
|
116
117
|
end
|
|
117
118
|
|
|
118
119
|
logger.info(:found_peers, peers: peers)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: teakflake
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Scarborough
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-06-
|
|
11
|
+
date: 2022-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: logsformyfamily
|