Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/sitescripts/manifests/keep_alive_services.pp

Issue 29329307: Issue 3211 - Integrate customservice::supervisor with notification daemon (Closed)
Patch Set: Created Oct. 20, 2015, 10:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/sitescripts/manifests/keep_alive_services.pp
diff --git a/modules/sitescripts/manifests/keep_alive_services.pp b/modules/sitescripts/manifests/keep_alive_services.pp
new file mode 100644
index 0000000000000000000000000000000000000000..fa7fda92a28aa5ce20d6f10c1c76066d52ff9168
--- /dev/null
+++ b/modules/sitescripts/manifests/keep_alive_services.pp
@@ -0,0 +1,18 @@
+# == Class: sitescripts::keep_alive_services
+#
+# Periodically check for and revive dead service instances.
+#
+class sitescripts::keep_alive_services {
Wladimir Palant 2015/10/21 11:05:26 I don't think that this belongs in the sitescripts
mathias 2015/10/21 11:44:01 I believe that a separation is not necessary: It i
Wladimir Palant 2015/10/21 12:07:06 That's not how we use sitescripts, and it really i
+
+ sitescripts::configfragment {'keep_alive_services':
+ content => template('sitescripts/keep_alive_services.erb'),
+ }
+
+ cron {'sitescripts::keep_alive_services':
+ command => 'python -m sitescripts.management.bin.start_services',
+ environment => concat(hiera('cron::environment', []), [
+ 'PYTHONPATH=/opt/sitescripts',
+ ]),
+ require => Sitescripts::Configfragment['keep_alive_services'],
+ }
+}

Powered by Google App Engine
This is Rietveld