pampa_workers 1.1.20 → 1.1.24
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/client.rb +7 -3
- data/lib/division.rb +1 -0
- data/lib/mybotprocess.rb +2 -2
- data/lib/myparentprocess.rb +20 -23
- data/lib/myremoteprocess.rb +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9611688e6258d2c1cb862a140c99ab2cabc6560a
|
4
|
+
data.tar.gz: 10984cdeaf0a293564f11fefabd28b6b60b31f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83abae67b06fc86f6cd6c0270e1720029b8eb05a67d8a8fd6cb93f497133dffa32f0f85b9c310fa71bf63526f6b28cafebabf6e3437c982911f1632d361848c
|
7
|
+
data.tar.gz: de18cb4f36fe33f262b55b2fd7a03baa8fc64a902d16206e40d2c9d7891c9d1052ec57c49599149c5796e29b4c7a785b3c6947f8f18eb8af6eae07e0072559ab
|
data/lib/client.rb
CHANGED
@@ -98,12 +98,16 @@ module BlackStack
|
|
98
98
|
# get signature
|
99
99
|
# more info: https://github.com/wildbit/postmark-gem/wiki/Senders
|
100
100
|
#
|
101
|
-
# this first strategy is not scalable if we handle a large list of signatures.
|
102
|
-
#sign = client_postmark.signatures.select { |sign| sign[:domain]==domain }.first
|
101
|
+
# TODO: this first strategy is not scalable if we handle a large list of signatures.
|
102
|
+
# sign = client_postmark.signatures.select { |sign| sign[:domain]==domain }.first
|
103
103
|
#
|
104
104
|
# this other approach is a bit more scalable, but anyway we need to call the API
|
105
105
|
# with filering by the domain.
|
106
106
|
#
|
107
|
+
#
|
108
|
+
# TODO: this code is a replication from the filter ?memeber/filter_update_reseller_signature
|
109
|
+
# Refer this issue for more information: https://github.com/leandrosardi/blackstack/issues/95
|
110
|
+
#
|
107
111
|
pagesize = 30 # TODO: increase this value to 300 for optimization
|
108
112
|
i = 0
|
109
113
|
j = 1
|
@@ -189,7 +193,7 @@ module BlackStack
|
|
189
193
|
def resellerSignatureName
|
190
194
|
# configuracion de cuenta reseller
|
191
195
|
if self.resellerSignatureEnabled?
|
192
|
-
return self.
|
196
|
+
return self.from_name_for_ssm.to_s
|
193
197
|
else
|
194
198
|
return NOTIFICATIONS[:from_name]
|
195
199
|
end
|
data/lib/division.rb
CHANGED
data/lib/mybotprocess.rb
CHANGED
@@ -69,7 +69,7 @@ module BlackStack
|
|
69
69
|
end
|
70
70
|
|
71
71
|
return lnuser
|
72
|
-
end #
|
72
|
+
end # getLnUserByUsername()
|
73
73
|
|
74
74
|
# returns a hash with the parameters of a lnuser
|
75
75
|
# raises an exception if it could not get a lnuser, or if ocurrs any other problem
|
@@ -377,7 +377,7 @@ puts ""
|
|
377
377
|
return ret
|
378
378
|
=end
|
379
379
|
end # isLnUserAvailable
|
380
|
-
|
380
|
+
|
381
381
|
end # class MyBotProcess
|
382
382
|
|
383
383
|
end # module BlackStack
|
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
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.24
|
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:
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|
@@ -96,20 +96,20 @@ dependencies:
|
|
96
96
|
requirements:
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: 1.1.
|
99
|
+
version: 1.1.8
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 1.1.
|
102
|
+
version: 1.1.8
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 1.1.
|
109
|
+
version: 1.1.8
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 1.1.
|
112
|
+
version: 1.1.8
|
113
113
|
description: 'THIS GEM IS STILL IN DEVELOPMENT STAGE. Find documentation here: https://github.com/leandrosardi/pampa.'
|
114
114
|
email: leandro.sardi@expandedventure.com
|
115
115
|
executables: []
|