rsf_services 0.8.1 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rsf_services.rb +35 -13
- metadata +25 -25
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86fb1a368503749f11101ebc687aaf588fd0af90ebf6687ca90f5a67f67036e5
|
4
|
+
data.tar.gz: 6abdb89a27223598d3c82e65b63d38c326de50503f83727d8dac29985df8c3c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ab2aec2be43819469b9cacea29e19fa41218e61b571c325138e0c486dcf69f0c025c9daad929e8039678df1d61ccbb3a504d500f970821abbfcebfb404137f6
|
7
|
+
data.tar.gz: 191df149e75687e22308c912e2e9acc43d91bd00c998bba54edaad468dfc87e1c0b8c82620a12bb83a1d5c1ca60c70e3f8c35936ccb13d123dd2de0e18a9dace
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rsf_services.rb
CHANGED
@@ -28,7 +28,7 @@ class RSFServices < RScriptRW
|
|
28
28
|
|
29
29
|
class Package
|
30
30
|
|
31
|
-
def initialize(obj, package, debug:
|
31
|
+
def initialize(obj, package, debug: false)
|
32
32
|
|
33
33
|
@obj, @package, @debug = obj, package, debug
|
34
34
|
|
@@ -79,9 +79,11 @@ class RSFServices < RScriptRW
|
|
79
79
|
|
80
80
|
puts 'inside RSF_services' if @debug
|
81
81
|
|
82
|
-
super(log: log)
|
82
|
+
super(log: log, debug: debug)
|
83
83
|
|
84
84
|
@package_basepath, @services = package_basepath, {}
|
85
|
+
|
86
|
+
@initialized = {}
|
85
87
|
|
86
88
|
if reg then
|
87
89
|
|
@@ -128,30 +130,50 @@ class RSFServices < RScriptRW
|
|
128
130
|
PackageMethod.new self, type: :post
|
129
131
|
end
|
130
132
|
|
131
|
-
def run_job(package, jobs, params={}, *qargs
|
132
|
-
|
133
|
+
def run_job(package, jobs, params={}, *qargs)
|
134
|
+
|
135
|
+
puts 'inside run_job' #if @debug
|
133
136
|
|
134
|
-
|
135
|
-
|
137
|
+
package_path = "%s/%s.rsf" % [@package_basepath, package]
|
138
|
+
|
139
|
+
if @log or @debug then
|
140
|
+
msg = 'RSFServices/run job: ' +
|
136
141
|
("package: %s jobs: %s params: %s qargs: %s " + \
|
137
142
|
" package_path: %s" % [package, jobs, params, qargs, package_path])
|
143
|
+
@log.info msg if @log
|
144
|
+
puts msg if @debug
|
138
145
|
end
|
139
146
|
|
140
147
|
yield(params) if block_given?
|
141
148
|
|
142
|
-
a = [package_path, jobs.split(/\s/).map{|x| "//job:%s" % x} ,qargs].flatten
|
143
|
-
|
144
|
-
|
149
|
+
a = [package_path, jobs.split(/\s/).map{|x| "//job:%s" % x} ,qargs].flatten(2)
|
150
|
+
|
151
|
+
puts 'a: ' + a.inspect if @debug
|
145
152
|
|
153
|
+
c, args, _ = read(a)
|
154
|
+
puts 'c: ' + c.inspect if @debug
|
146
155
|
rws, reg, app = self, @registry, @app
|
147
156
|
|
148
157
|
begin
|
149
158
|
|
150
|
-
@log.info 'RSFServices/run job: code: ' + c if @log
|
159
|
+
@log.info 'RSFServices/run job: code: ' + c if @log and c.is_a? String
|
160
|
+
|
161
|
+
# if there is a job id called *initialize* then execute if it hasn't
|
162
|
+
# already been executed
|
163
|
+
|
164
|
+
if self.jobs(package_path).include? :initialize and
|
165
|
+
!@initialized[package_path] and jobs != 'initialize' then
|
166
|
+
run_job(package, 'initialize')
|
167
|
+
@initialized[package_path] = true
|
168
|
+
end
|
151
169
|
|
152
170
|
r = eval c
|
171
|
+
puts 'r: ' + r.inspect if @debug
|
172
|
+
#thread = Thread.new {Thread.current[:v] = eval c}
|
173
|
+
#thread.join
|
174
|
+
#r = thread[:v]
|
153
175
|
|
154
|
-
@log.info 'RSFServices/run job: result: ' + r if @log
|
176
|
+
@log.info 'RSFServices/run job: result: ' + r if @log and r.is_a? String
|
155
177
|
|
156
178
|
return r
|
157
179
|
|
@@ -162,7 +184,7 @@ class RSFServices < RScriptRW
|
|
162
184
|
@log.debug 'RSFServices/run_job/error: ' + err_label if @log
|
163
185
|
|
164
186
|
end
|
165
|
-
|
187
|
+
|
166
188
|
end
|
167
189
|
|
168
190
|
def package_methods(package)
|
@@ -175,7 +197,7 @@ class RSFServices < RScriptRW
|
|
175
197
|
|
176
198
|
private
|
177
199
|
|
178
|
-
def
|
200
|
+
def method_missing2(method_name, *args)
|
179
201
|
self.type = :get
|
180
202
|
Package.new self, method_name.to_s, debug: @debug
|
181
203
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsf_services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,31 +11,31 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjAwNjI4MTAzODExWhcN
|
15
|
+
MjEwNjI4MTAzODExWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDihlal
|
17
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GWctofw6EhsT7NbdSMBJ9nAuJbcFYXshWIJr11CgrSekM
|
31
|
+
66idwveobI9GeVzWHWI9KmnM6r7Th2dK4lS5y42y4pACzRSTacBVF2lylu2/X8oS
|
32
|
+
nzHN7yMdXRhdvboDI3Etq10pLs+e7cmB/6MkWV9Ba6kOMbJeeXokdjo6A03w/CXW
|
33
|
+
kSCp6ydjpEAtQhXpTOOWQfMXwafnNXvcVyh5mtQvSluCdVy0Qf5dHZuMaF+iIdtM
|
34
|
+
mS6T6oPPYAVaC+9DHMD5+hJRIo/U5sb+ZUQaHaME8XNCuHGxPbL2WmZr92iKZVCu
|
35
|
+
MxhWn7Vf3TxD/7nwBz7wR+H2ONNwWRWmRA7g+Os9YvLEB6LNsJfo+Tyer6bVsSBz
|
36
|
+
EOn2RvkdKH17/N7rqiDFRtI2
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2020-06-28 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dws-registry
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.0.
|
106
|
+
rubygems_version: 3.0.3
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Runs within a DRb server to run RSF jobs, as well as other services.
|
metadata.gz.sig
CHANGED
Binary file
|