tiny_work_service 1.0.0 → 1.1.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 +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc35138fd65fcf0c164d74f32a5539dffd68bfce985ddfaeec85550d95f7cc6
|
4
|
+
data.tar.gz: 5afe59af1e9ae2497b9aefd0bd3a2fa7dbaf125b10b824450544ad29ad92b855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbf5fe22d528c584066f85f278620a401fbf81413b02fb6ff49273e5be5e0a116a1e1f8fada62e224e2354f1b8371d84b092c0ac05bedb1e31e738b6ad71342d
|
7
|
+
data.tar.gz: 14c1aec2a7774e3392cee052f76a00467d496ee300c54da5d4be2f24b8a722eb3c3c5ac1a7ce9bd4daca0d21a55895b6ac7cd8c15d42934965c6fd50bc2dfcba
|
data/lib/tiny_work_service.rb
CHANGED
@@ -9,7 +9,7 @@ class TinyWorkService
|
|
9
9
|
@service.msg_handler = self
|
10
10
|
@jobs = Queue.new
|
11
11
|
|
12
|
-
Thread.new do
|
12
|
+
@thread = Thread.new do
|
13
13
|
loop do
|
14
14
|
break unless @service.running?
|
15
15
|
|
@@ -34,6 +34,11 @@ class TinyWorkService
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
# join the service Thread, if you want to wait until it's done
|
38
|
+
def join
|
39
|
+
@thread.join
|
40
|
+
end
|
41
|
+
|
37
42
|
# enqueue a job
|
38
43
|
def <<(j)
|
39
44
|
@jobs << j
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Lunt
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.3'
|
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: '
|
26
|
+
version: '1.3'
|
27
27
|
description: uses the tiny_tcp_service gem to implement a job queue
|
28
28
|
email: jefflunt@gmail.com
|
29
29
|
executables: []
|