pampa_workers 1.1.21 → 1.1.22
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/lib/division.rb +1 -0
- data/lib/myparentprocess.rb +20 -23
- data/lib/myremoteprocess.rb +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97d6d17d7b9340bebb456fc5e7e90290ce208662
|
4
|
+
data.tar.gz: 69e9d402ab6c49354dfb5c99f76fd53409acf10a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e587325d88ca7ffed7d7ca03de82355c8422c44a925ae3bef1aba6d6b2b72b570beeeb57c7f85e7919854ff291594113b16c8999a492932151672a190fc97321
|
7
|
+
data.tar.gz: e38ffd7e0a5918f564c212980874ce011476009cb46dc609e642cf51a12a3816e667833f7fa24cdd44925a36ce0d377d4e55c294314e1d9ab55c4099f40afb14
|
data/lib/division.rb
CHANGED
data/lib/myparentprocess.rb
CHANGED
@@ -61,31 +61,28 @@ module BlackStack
|
|
61
61
|
self.ws_url = parsed['ws_url']
|
62
62
|
self.ws_port = parsed['ws_port']
|
63
63
|
self.logger.logf "done (#{self.division_name})"
|
64
|
-
|
64
|
+
|
65
65
|
#
|
66
|
-
self.logger.logs "
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
logger.logf "
|
80
|
-
|
81
|
-
logger.log("Wait to child process to finish.")
|
82
|
-
Process.wait(pid)
|
66
|
+
self.logger.logs "Spawn child process... "
|
67
|
+
# lanzo el proceso
|
68
|
+
if self.assigned_process.to_s.size > 0
|
69
|
+
command = "ruby #{self.assigned_process} name=#{self.worker_name} division=#{self.division_name}"
|
70
|
+
pid = Process.spawn(command)
|
71
|
+
logger.logf "done (pid=#{pid.to_s})"
|
72
|
+
|
73
|
+
logger.log("Wait to child process to finish.")
|
74
|
+
Process.wait(pid)
|
75
|
+
else #if self.assigned_process.to_s.size == 0
|
76
|
+
self.logger.logf "no process assigned"
|
77
|
+
self.logger.logs "Notify division... "
|
78
|
+
if self.division_name.to_s.size == 0
|
79
|
+
self.logger.logf "no division assigned"
|
83
80
|
else
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
81
|
+
self.notify # notifico a la division
|
82
|
+
self.logger.done
|
83
|
+
end # if self.division_name.to_s.size == 0
|
84
|
+
end # if self.assigned_process.to_s.size > 0
|
85
|
+
|
89
86
|
end # if (parsed['status'] != "success") <-- #{BlackStack::Pampa::api_url}/api1.3/pampa/get.json
|
90
87
|
end # if (parsed['status'] != "success") <-- #{BlackStack::Pampa::api_url}/api1.3/pampa/hello.json
|
91
88
|
|
data/lib/myremoteprocess.rb
CHANGED
@@ -7,6 +7,7 @@ module BlackStack
|
|
7
7
|
attr_accessor :worker
|
8
8
|
|
9
9
|
# update worker configuration in the division
|
10
|
+
# TODO: deprecated
|
10
11
|
def updateWorker()
|
11
12
|
# creo un remote worker que manejare en este proceso remote
|
12
13
|
self.worker = BlackStack::RemoteWorker.new
|
@@ -58,9 +59,9 @@ module BlackStack
|
|
58
59
|
logger.done
|
59
60
|
|
60
61
|
# actualizo los datos de este worker (parent process)
|
61
|
-
logger.logs "Update worker (1-remote)... "
|
62
|
-
self.updateWorker
|
63
|
-
logger.done
|
62
|
+
# logger.logs "Update worker (1-remote)... "
|
63
|
+
# self.updateWorker
|
64
|
+
# logger.done
|
64
65
|
|
65
66
|
# actualizo los datos de este worker (parent process)
|
66
67
|
logger.logs "Switch logger id_client (log folder may change)... "
|
@@ -113,9 +114,9 @@ module BlackStack
|
|
113
114
|
logger.done
|
114
115
|
|
115
116
|
# actualizo los datos de este worker (parent process)
|
116
|
-
logger.logs "Update worker (2)... "
|
117
|
-
self.updateWorker
|
118
|
-
logger.done
|
117
|
+
# logger.logs "Update worker (2)... "
|
118
|
+
# self.updateWorker
|
119
|
+
# logger.done
|
119
120
|
|
120
121
|
# sleep
|
121
122
|
logger.logs "Sleep... "
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pampa_workers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|