pampa_workers 1.1.16 → 1.1.21
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 +9 -5
- data/lib/mybotprocess.rb +2 -2
- data/lib/pampa_workers.rb +15 -3
- 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: 35d76261e7cc9d34b697d6ba5294e647618d7c94
|
4
|
+
data.tar.gz: 4571ff358632a8d187f879981e8683ef81b34a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3285da8c4f4e5939aa5cbf3b754f047850537a4309d2c6edb7c5dba07b7ac7ede320c319833b016dd65dc415feb028687f9f45d110c44a17e09011064e46767e
|
7
|
+
data.tar.gz: ce97a9e687ef6328b353db639a3900ceacce52aabe9c1e2e199a6bf127c5a5357996865feb1858fab0ff0187227f76229662249741160bd35e548ea99e128bda
|
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
|
@@ -181,7 +185,7 @@ module BlackStack
|
|
181
185
|
if self.resellerSignatureEnabled?
|
182
186
|
return self.from_email_for_ssm.to_s
|
183
187
|
else
|
184
|
-
return
|
188
|
+
return NOTIFICATIONS[:from_email]
|
185
189
|
end
|
186
190
|
end
|
187
191
|
|
@@ -189,9 +193,9 @@ 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
|
-
return
|
198
|
+
return NOTIFICATIONS[:from_name]
|
195
199
|
end
|
196
200
|
end
|
197
201
|
end # class Client
|
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/pampa_workers.rb
CHANGED
@@ -32,6 +32,7 @@ module BlackStack
|
|
32
32
|
|
33
33
|
#
|
34
34
|
@@division_name = nil
|
35
|
+
@@timeout = 7
|
35
36
|
|
36
37
|
def self.division_name()
|
37
38
|
@@division_name
|
@@ -42,10 +43,19 @@ module BlackStack
|
|
42
43
|
@@division_name = s
|
43
44
|
end
|
44
45
|
|
46
|
+
def self.timeout()
|
47
|
+
@@timeout
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
def self.set_timeout(n)
|
52
|
+
@@timeout = n
|
53
|
+
end
|
54
|
+
|
45
55
|
# Api-key of the client who will be the owner of a process.
|
46
56
|
@@api_key = nil
|
47
57
|
|
48
|
-
def self.api_key()
|
58
|
+
def self.api_key()
|
49
59
|
@@api_key
|
50
60
|
end
|
51
61
|
|
@@ -212,7 +222,8 @@ module BlackStack
|
|
212
222
|
:port => BlackStack::Pampa::db_port, # Required when using other that 1433 (default)
|
213
223
|
:database => BlackStack::Pampa::db_name,
|
214
224
|
:user => BlackStack::Pampa::db_user,
|
215
|
-
:password => BlackStack::Pampa::db_password
|
225
|
+
:password => BlackStack::Pampa::db_password,
|
226
|
+
:timeout => BlackStack::Pampa::timeout
|
216
227
|
}
|
217
228
|
else
|
218
229
|
url = "#{BlackStack::Pampa::api_url}/api1.2/division/get.json"
|
@@ -233,7 +244,8 @@ module BlackStack
|
|
233
244
|
:port => parsed["db_port"], # only required if port is different than 1433
|
234
245
|
:database => parsed["db_name"],
|
235
246
|
:user => parsed["db_user"],
|
236
|
-
:password => parsed["db_password"]
|
247
|
+
:password => parsed["db_password"],
|
248
|
+
:timeout => BlackStack::Pampa::timeout
|
237
249
|
}
|
238
250
|
end
|
239
251
|
end
|
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.21
|
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-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|