omf_rc_shm 0.1.6 → 0.1.7
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 +8 -8
- data/config/rc.yml.sample +4 -1
- data/lib/omf_rc/resource_proxy/shm_node.rb +8 -0
- data/lib/omf_rc_shm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODIxMDgzNTk2ZmViYzBlNDViZDVhNTBlZTIwN2NlODQ2ZWI0ZWRmMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmJiMDE0Yzk0MTA0Mzc1ZjM2NzhhMzM2YjJhZGI2NjI5ZjMxYTM5Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2ZmNzI5MjNjZDM3MDI2NjhhNWNjMjE0ZmI3OTBhODU2NDJmNDFjNDcwOTZi
|
10
|
+
YTQxOWM4MDMxNzQ4Mjk1NjA5ZTgxYzQwNzIwNGY4YjVhOWFmMWM0ODIxNGQz
|
11
|
+
ZDVlZDAwYTc4N2RlMmFhYWJjMWI0NjlkM2YxNTQ1OWVlODMyZmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmIzNmI4ZTc4ODMyMDEwNmI5YjJiMTA1ZWJjMGFhNzUwM2I2OTExNmY3MWQz
|
14
|
+
YzgxMWM3MDQyMDlkY2IxOThhYjMxZTQ1ZjhkYzUwYzlmMDllZWI2NGJhYjBh
|
15
|
+
M2Q5NWE0NmY3YWNhMWFiYjNiNTk1NTU2NDE5YzhlZDFmN2I2MWQ=
|
data/config/rc.yml.sample
CHANGED
@@ -6,9 +6,12 @@
|
|
6
6
|
|
7
7
|
:resources:
|
8
8
|
- :type: shm_node
|
9
|
-
:uid: <%=
|
9
|
+
:uid: <%= ip = `ifconfig br0`.match(/inet addr:(\d*\.\d*\.\d*\.\d*)/)[1].split('.') ; 'node' + (ip[2].to_i*256+ip[3].to_i).to_s.rjust(4,'0') %>
|
10
10
|
:app_definition_file: path_to_your_app_definition_file
|
11
11
|
:ruby_path: <full_path_to_ruby>
|
12
|
+
# Uncomment :watchdog_timer line to start the watchdog time, set the top-up
|
13
|
+
# value in second (make sure to have it lower than timeout value)
|
14
|
+
#:watchdog_timer: 15
|
12
15
|
|
13
16
|
:add_default_factories: false # Not loading default type factories
|
14
17
|
|
@@ -6,6 +6,7 @@ module OmfRc::ResourceProxy::ShmNode
|
|
6
6
|
property :app_definition_file
|
7
7
|
property :oml_uri
|
8
8
|
property :ruby_path
|
9
|
+
property :watchdog_timer, :default => nil
|
9
10
|
|
10
11
|
request :cron_jobs do |node|
|
11
12
|
node.children.find_all { |v| v.type =~ /scheduled_application/ }.map do |v|
|
@@ -24,6 +25,13 @@ module OmfRc::ResourceProxy::ShmNode
|
|
24
25
|
s_app.configure_state(:scheduled)
|
25
26
|
end
|
26
27
|
end
|
28
|
+
# if required, start the watchdog timer and periodically top it
|
29
|
+
unless node.property.watchdog_timer.nil?
|
30
|
+
info "Watchdog Timer started with interval: #{node.property.watchdog_timer}"
|
31
|
+
EventMachine.add_periodic_timer(node.property.watchdog_timer.to_i) do
|
32
|
+
`echo "1" >/dev/watchdog`
|
33
|
+
end
|
34
|
+
end
|
27
35
|
end
|
28
36
|
|
29
37
|
hook :before_ready do
|
data/lib/omf_rc_shm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_rc_shm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NICTA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|