pampa 2.0.24 → 2.0.26
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/pampa.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bcb6b11658cc64956d3d76da6b719f7a0d427b1977022cb4fe03dbdc7183d63
|
4
|
+
data.tar.gz: 53d8a77364f4d287ede95c9c442b9ae48a1f11e1af28ee9959babd8d99e6678a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bd0e49be81656cfddbb9749970493a05fe185ebaf86b532276c8c4c2a1c05097754b8268980a57e82d051a5c168b405b2314d0299a27e3d3d1169e0ca9a6320
|
7
|
+
data.tar.gz: 419042bea77b87598ff6d9720e1c62cffc672e5b060e98f8b7f2b3baa3d8be27b9300b57fa92bf5e0832cd581e4a2b9d520b63b56033ff58454aa282c80e5e5c
|
data/lib/pampa.rb
CHANGED
@@ -245,7 +245,7 @@ module BlackStack
|
|
245
245
|
# - config: relative path of the configuration file. Example: '../config.rb'
|
246
246
|
# - worker: relative path of the worker.rb file. Example: '../worker.rb'
|
247
247
|
#
|
248
|
-
def self.relaunch()
|
248
|
+
def self.relaunch(n=10000)
|
249
249
|
# validate: the connection string is not nil
|
250
250
|
raise "The connection string is nil" if @@connection_string.nil?
|
251
251
|
# validate: the connection string is not empty
|
@@ -257,8 +257,8 @@ module BlackStack
|
|
257
257
|
# iterate the workers
|
258
258
|
BlackStack::Pampa.jobs.each { |job|
|
259
259
|
l.logs("job:#{job.name}... ")
|
260
|
-
l.logs("Gettting tasks to relaunch (max #{
|
261
|
-
tasks = job.relaunching(
|
260
|
+
l.logs("Gettting tasks to relaunch (max #{n})... ")
|
261
|
+
tasks = job.relaunching(n)
|
262
262
|
l.logf("done (#{tasks.size.to_s})")
|
263
263
|
|
264
264
|
tasks.each { |task|
|
@@ -793,7 +793,7 @@ module BlackStack
|
|
793
793
|
WHERE COALESCE(#{self.field_time.to_s}, '1900-01-01') < CAST('#{BlackStack::Pampa.now}' AS TIMESTAMP) - INTERVAL '#{self.max_job_duration_minutes.to_i} minutes'
|
794
794
|
AND #{self.field_id.to_s} IS NOT NULL
|
795
795
|
AND #{self.field_end_time.to_s} IS NULL
|
796
|
-
AND COALESCE(#{self.field_times.to_s},0) < #{self.max_try_times.to_i}
|
796
|
+
--AND COALESCE(#{self.field_times.to_s},0) < #{self.max_try_times.to_i}
|
797
797
|
LIMIT #{n}
|
798
798
|
"
|
799
799
|
DB[q].all
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pampa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.26
|
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: 2022-
|
11
|
+
date: 2022-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|