cpee 2.1.71 → 2.1.74
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/cockpit/css/wfadaptor.css +1 -1
- data/cockpit/js/instance.js +45 -27
- data/cockpit/js/modifiers.js +3 -0
- data/cockpit/templates/ML-pipe-multi.xml +635 -0
- data/cockpit/templates/Track Test Local.xml +19 -13
- data/cockpit/themes/base.js +14 -5
- data/cpee.gemspec +2 -2
- data/lib/cpee/implementation.rb +22 -1
- data/lib/cpee/implementation_callbacks.rb +15 -1
- data/lib/cpee/implementation_properties.rb +14 -1
- data/lib/cpee/message.rb +1 -1
- data/lib/engine/executionhandler-list.rng +32 -0
- data/lib/engine.xml +8 -0
- data/server/executionhandlers/eval/controller.rb +11 -1
- data/server/executionhandlers/ruby/controller.rb +1 -1
- data/server/executionhandlers/ruby/execution.rb +0 -1
- metadata +4 -11
- data/cockpit/templates/Coopis 2010 Eval.xml +0 -192
- data/server/executionhandlers/rust/backend/README.md +0 -17
- data/server/executionhandlers/rust/backend/compile.sh +0 -5
- data/server/executionhandlers/rust/backend/opts.yaml +0 -6
- data/server/executionhandlers/rust/execution.rb +0 -84
- data/server/routing/end.pid +0 -1
- data/server/routing/forward-events-00.pid +0 -1
- data/server/routing/forward-votes.pid +0 -1
- data/server/routing/persist.pid +0 -1
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# This file is part of CPEE.
|
|
2
|
-
#
|
|
3
|
-
# CPEE is free software: you can redistribute it and/or modify it under the terms
|
|
4
|
-
# of the GNU General Public License as published by the Free Software Foundation,
|
|
5
|
-
# either version 3 of the License, or (at your option) any later version.
|
|
6
|
-
#
|
|
7
|
-
# CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
8
|
-
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
9
|
-
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
10
|
-
#
|
|
11
|
-
# You should have received a copy of the GNU General Public License along with
|
|
12
|
-
# CPEE (file COPYING in the main directory). If not, see
|
|
13
|
-
# <http://www.gnu.org/licenses/>.
|
|
14
|
-
|
|
15
|
-
module CPEE
|
|
16
|
-
|
|
17
|
-
module ExecutionHandler
|
|
18
|
-
|
|
19
|
-
module Rust
|
|
20
|
-
BACKEND_INSTANCE = 'instance.rs'
|
|
21
|
-
BACKEND_OPTS = 'opts.yaml'
|
|
22
|
-
BACKEND_COMPILE = File.expand_path(File.join(__dir__,'backend','compile.sh'))
|
|
23
|
-
BACKEND_RUN = File.expand_path(File.join(__dir__,'backend','run'))
|
|
24
|
-
|
|
25
|
-
def self::dslx_to_dsl(dslx) # transpile
|
|
26
|
-
'hello world'
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def self::prepare(id,opts) # write result to disk
|
|
30
|
-
Dir.mkdir(File.join(opts[:instances],id.to_s)) rescue nil
|
|
31
|
-
FileUtils.copy(ExecutionHandler::Rust::BACKEND_COMPILE,File.join(opts[:instances],id.to_s))
|
|
32
|
-
dsl = CPEE::Persistence::extract_item(id,opts,'dsl')
|
|
33
|
-
hw = CPEE::Persistence::extract_item(id,opts,'executionhandler')
|
|
34
|
-
endpoints = CPEE::Persistence::extract_list(id,opts,'endpoints').to_h
|
|
35
|
-
dataelements = CPEE::Persistence::extract_list(id,opts,'dataelements').to_h
|
|
36
|
-
attributes = CPEE::Persistence::extract_list(id,opts,'attributes').to_h
|
|
37
|
-
positions = CPEE::Persistence::extract_set(id,opts,'positions')
|
|
38
|
-
positions.map! do |k, v|
|
|
39
|
-
[ k, v, CPEE::Persistence::extract_item(id,opts,File.join('positions',k,'@passthrough')) ]
|
|
40
|
-
end
|
|
41
|
-
File.open(File.join(opts[:instances],id.to_s,ExecutionHandler::Rust::BACKEND_OPTS),'w') do |f|
|
|
42
|
-
YAML::dump({
|
|
43
|
-
:host => opts[:host],
|
|
44
|
-
:url => opts[:url],
|
|
45
|
-
:redis_url => opts[:redis_url],
|
|
46
|
-
:redis_path => File.join(opts[:basepath],opts[:redis_path]),
|
|
47
|
-
:redis_db => opts[:redis_db],
|
|
48
|
-
:workers => opts[:workers],
|
|
49
|
-
:global_executionhandlers => opts[:global_executionhandlers],
|
|
50
|
-
:executionhandlers => opts[:executionhandlers],
|
|
51
|
-
:executionhandler => hw,
|
|
52
|
-
:endpoints => endpoints,
|
|
53
|
-
:dataelements => dataelements,
|
|
54
|
-
:positions => positions,
|
|
55
|
-
:attributes => attributes
|
|
56
|
-
},f)
|
|
57
|
-
end
|
|
58
|
-
File.write(File.join(opts[:instances],id.to_s,ExecutionHandler::Rust::BACKEND_INSTANCE),dsl)
|
|
59
|
-
`#{File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Rust::BACKEND_COMPILE))}`
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def self::run(id,opts)
|
|
63
|
-
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Rust::BACKEND_RUN))
|
|
64
|
-
pid = Kernel.spawn(exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
|
|
65
|
-
Process.detach pid
|
|
66
|
-
File.write(exe + '.pid',pid)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def self::stop(id,opts) ### return: bool to tell if manually changing redis is necessary
|
|
70
|
-
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Rust::BACKEND_RUN))
|
|
71
|
-
pid = File.read(exe + '.pid') rescue nil
|
|
72
|
-
if pid && (Process.kill(0, pid.to_i) rescue false)
|
|
73
|
-
Process.kill('HUP', pid.to_i) rescue nil
|
|
74
|
-
false
|
|
75
|
-
else # its not running, so clean up
|
|
76
|
-
File.unlink(exe + '.pid') rescue nil
|
|
77
|
-
true
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
end
|
data/server/routing/end.pid
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
570906
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
570924
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
570918
|
data/server/routing/persist.pid
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
570912
|