pampa 2.0.30 → 2.0.31
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/dispatcher.rb +10 -0
- data/lib/pampa/worker.rb +10 -0
- data/lib/pampa.rb +17 -0
- data/pampa.gemspec +2 -2
- 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: af7a0536c38fa454e4f28d00ec1be0d13399d6dffb2d390e8128f417c8f7af8e
|
|
4
|
+
data.tar.gz: 11bd7721b54ae0a8e3ae56702ab3891272ab8818ccfb3d04da077b747cfed833
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3dd788d3ab9b61d0c36cf777cd2233dbed35a8c21b32b12ed2e393d77ed12f034a27bfb9f6cd4fc6d81d20f714babd96c73e6d916e68439bd22fb629d185e42b
|
|
7
|
+
data.tar.gz: 24a4bb824b6d4d39572e23033508f846d799f0cd5681c896a25298ef352b09cd5df58b1fe1a82ab25f9307658f236080b72880ab57234f70862cf28ae3a13d70
|
data/lib/pampa/dispatcher.rb
CHANGED
|
@@ -60,6 +60,16 @@ else
|
|
|
60
60
|
end
|
|
61
61
|
l.logf 'done'.green
|
|
62
62
|
|
|
63
|
+
# call dispatcher code snippet
|
|
64
|
+
l.logs 'Calling dispatcher code snippet... '
|
|
65
|
+
f = BlackStack::Pampa.dispatcher_function
|
|
66
|
+
if f
|
|
67
|
+
f.call
|
|
68
|
+
l.logf 'done'.green
|
|
69
|
+
else
|
|
70
|
+
l.logf 'no dispatcher code snippet found'.yellow
|
|
71
|
+
end
|
|
72
|
+
|
|
63
73
|
# loop
|
|
64
74
|
begin
|
|
65
75
|
while true
|
data/lib/pampa/worker.rb
CHANGED
|
@@ -66,6 +66,16 @@ else
|
|
|
66
66
|
end
|
|
67
67
|
l.logf 'done'.green
|
|
68
68
|
|
|
69
|
+
# call dispatcher code snippet
|
|
70
|
+
l.logs 'Calling worker code snippet... '
|
|
71
|
+
f = BlackStack::Pampa.worker_function
|
|
72
|
+
if f
|
|
73
|
+
f.call
|
|
74
|
+
l.logf 'done'.green
|
|
75
|
+
else
|
|
76
|
+
l.logf 'no worker code snippet found'.yellow
|
|
77
|
+
end
|
|
78
|
+
|
|
69
79
|
begin
|
|
70
80
|
# getting the worker object
|
|
71
81
|
l.logs 'Getting worker '+PARSER.value('id').blue+'... '
|
data/lib/pampa.rb
CHANGED
|
@@ -12,6 +12,8 @@ module BlackStack
|
|
|
12
12
|
@@nodes = []
|
|
13
13
|
@@jobs = []
|
|
14
14
|
@@logger = BlackStack::DummyLogger.new(nil)
|
|
15
|
+
@@dispatcher_function = nil
|
|
16
|
+
@@worker_function = nil
|
|
15
17
|
|
|
16
18
|
# add a node to the cluster.
|
|
17
19
|
def self.add_node(h)
|
|
@@ -69,6 +71,21 @@ module BlackStack
|
|
|
69
71
|
@@logger = l
|
|
70
72
|
end
|
|
71
73
|
|
|
74
|
+
|
|
75
|
+
def self.set_snippets(h)
|
|
76
|
+
@@dispatcher_function = h[:dispatcher_function]
|
|
77
|
+
@@worker_function = h[:worker_function]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def self.dispatcher_function
|
|
81
|
+
@@dispatcher_function
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def self.worker_function
|
|
85
|
+
@@worker_function
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
|
|
72
89
|
# get attached and unassigned workers.
|
|
73
90
|
# assign and unassign workers to jobs.
|
|
74
91
|
#
|
data/pampa.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'pampa'
|
|
3
|
-
s.version = '2.0.
|
|
4
|
-
s.date = '2023-10-
|
|
3
|
+
s.version = '2.0.31'
|
|
4
|
+
s.date = '2023-10-07'
|
|
5
5
|
s.summary = "Ruby library for async & distributed computing, supporting dynamic reconfiguration, distribution of the computation jobs, error handling, job-retry and fault tolerance, and fast (non-direct) communication to ensure real-time capabilities."
|
|
6
6
|
s.description = "Pampa is a Ruby library for async & distributing computing providing the following features:
|
|
7
7
|
|
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.31
|
|
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: 2023-10-
|
|
11
|
+
date: 2023-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubygems-bundler
|