tiny_work_service 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tiny_work_service.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 327188d9aeb076b114aa5915bda2a4a50516b070152df17f8242f9fe09548d67
|
4
|
+
data.tar.gz: fe76da5717bea63e4ab09ff69663ba8209984024fbf50af412b20d96d99f61bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ca1d978cb9aa4a88f61970e3ea675cd58da4a55c20e0fb3121b73d40e15eef84badd27d3ba13b33f06d81e09ab5780e78448c83a58dcfcbfdfe65db9e618774
|
7
|
+
data.tar.gz: ca2f7f1300eb9093ace4657fefa6beba346f4fb9f9284398f4f84ccb7f26324f25b8e6ccd032097d018887511d598b73eaae8dab2015c5441c6c1ec48a5ba6d2
|
data/lib/tiny_work_service.rb
CHANGED
@@ -10,11 +10,11 @@ class TinyWorkService
|
|
10
10
|
@jobs = Queue.new
|
11
11
|
@label = label
|
12
12
|
|
13
|
-
|
13
|
+
Thread.new do
|
14
14
|
loop do
|
15
15
|
break unless @service.running?
|
16
16
|
|
17
|
-
print "\r#{@label} #{@jobs.length.to_s.rjust(6)} jobs #{@service.num_clients.to_s.rjust(4)} workers\e[K"
|
17
|
+
print "\r#{@label}:#{port} #{@jobs.length.to_s.rjust(6)} jobs #{@service.num_clients.to_s.rjust(4)} workers\e[K"
|
18
18
|
sleep 0.5
|
19
19
|
end
|
20
20
|
end
|
@@ -37,7 +37,7 @@ class TinyWorkService
|
|
37
37
|
|
38
38
|
# join the service Thread, if you want to wait until it's done
|
39
39
|
def join
|
40
|
-
@
|
40
|
+
@service.join
|
41
41
|
end
|
42
42
|
|
43
43
|
# enqueue a job
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_work_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Lunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tiny_tcp_service
|
@@ -16,15 +16,15 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
27
|
-
description: uses the tiny_tcp_service gem to implement a job queue
|
26
|
+
version: '1.4'
|
27
|
+
description: uses the tiny_tcp_service gem to implement a network job queue
|
28
28
|
email: jefflunt@gmail.com
|
29
29
|
executables: []
|
30
30
|
extensions: []
|
@@ -53,5 +53,5 @@ requirements: []
|
|
53
53
|
rubygems_version: 3.3.7
|
54
54
|
signing_key:
|
55
55
|
specification_version: 4
|
56
|
-
summary: uses the tiny_tcp_service gem to implement a job queue
|
56
|
+
summary: uses the tiny_tcp_service gem to implement a network job queue
|
57
57
|
test_files: []
|