omf_rc_shm 0.1.4 → 0.1.5
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
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzM2N2U2OTlhYmM5Y2MwNzYzYTNjYTJjNTY5YTNiYzZjZjdhMzYzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODFlNDQyMGMxOGM4MzU4NDYyYTMzZjA3NDA0MjRjM2Q4MjYxZDMwNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTc5ZDIyNjA4NjMzYWJlMjJjZjExMDViZGY3YzhlNzM0OTVhZDk1OTc4MDQy
|
10
|
+
ZGZkMTcyMGRlNzM4ODY0ZjczNzU4MjAxMGU0ZWZlYzM0Y2FhYzNiYWM0ZTg5
|
11
|
+
Mjg5NTU3ZGQ5OWZmZTMwMjI0ZDM5ODNlYzlhMTE3ZmYwNDM1ZjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjVmZGUxZjk1NDNiYjIyNTgzYzdlOGIyOGM3YjcxZDEwNzY5MTI4ZDkyMzVh
|
14
|
+
YjkzMWUwODc5Yzg1OGJmOTg4MWY5OGYxZGFiNWYwNDczMzA2NmFiZGY5NGJl
|
15
|
+
ZTM1OTVkNzMxNjk0MTI0M2Y1ZDA4OGY5M2I3ZDk4ZTk1ZWFiMjE=
|
data/bin/cronjob_app_wrapper
CHANGED
@@ -13,7 +13,10 @@ if timeout && timeout.to_i > 0
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
Process.
|
17
|
-
|
18
|
-
`echo Process #{pid} exited with code: #{$?.exitstatus} >> #{stderr_f}`
|
16
|
+
p_id, p_status = Process.waitpid2(pid)
|
19
17
|
|
18
|
+
if p_status.exitstatus
|
19
|
+
`echo Process #{p_id} #{cmd} exited with status: #{p_status.exitstatus} >> #{stderr_f}`
|
20
|
+
elsif p_status.signaled?
|
21
|
+
`echo Process #{p_id} #{cmd} killed by signal: #{p_status.termsig} >> #{stderr_f}`
|
22
|
+
end
|
data/config/rc.yml.sample
CHANGED
@@ -7,10 +7,11 @@
|
|
7
7
|
:resources:
|
8
8
|
- :type: shm_node
|
9
9
|
:uid: <%= Socket.gethostname %>
|
10
|
-
|
10
|
+
:app_definition_file: path_to_your_app_definition_file
|
11
|
+
:ruby_path: <full_path_to_ruby>
|
11
12
|
|
12
|
-
|
13
|
+
:add_default_factories: false # Not loading default type factories
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
:factories: # Additional resources which can be created by this RC
|
16
|
+
- :require: omf_rc_shm
|
16
17
|
|
@@ -328,6 +328,7 @@ module OmfRc::ResourceProxy::ScheduledApplication
|
|
328
328
|
app_wrapper_path = File.expand_path("#{File.dirname(__FILE__)}/../../../bin/cronjob_app_wrapper")
|
329
329
|
|
330
330
|
cmd = "#{app_wrapper_path} #{stdout_file} #{stderr_file} #{pid_file} #{res.property.timeout} #{res.property.timeout_kill_signal} #{res.build_command_line}"
|
331
|
+
cmd = "#{res.property.ruby_path} #{cmd}" if res.property.ruby_path
|
331
332
|
|
332
333
|
info "Adding cron job for '#{res.property.app_id}' with schedule '#{res.property.schedule}' and command '#{cmd}'"
|
333
334
|
|
data/lib/omf_rc_shm/version.rb
CHANGED