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

Unified Diff: modules/updateserver/templates/update_update_manifests.erb

Issue 5071748311547904: Issue 1094 - Generate update manifests on the update server (Closed)
Patch Set: Reduced duplication Created July 25, 2014, 7:17 a.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/updateserver/templates/update_update_manifests.erb
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/updateserver/templates/update_update_manifests.erb
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+run_file="/var/run/update_update_manifests"
+
+if [[ -f $run_file ]]; then
+ exit 0
Wladimir Palant 2014/07/25 09:50:11 What if this script crashes and doesn't remove the
Felix Dahlke 2014/07/25 10:31:15 Using flock now, are you happy with that? It'll ha
Wladimir Palant 2014/07/25 11:11:02 I'd really prefer a standardized solution that wou
Felix Dahlke 2014/07/25 14:17:56 I've looked into daemon, but I don't like the fact
+fi
+
+echo "$$" >> "$run_file"
+
+<% repositories_to_sync.each do |repository| %>
+hg pull -q -u -R <%= base_dir %>/<%= repository %>
Wladimir Palant 2014/07/25 09:50:11 Updating is unnecessary, the scripts work with the
Felix Dahlke 2014/07/25 10:31:15 Done.
+<% end %>
+
+export PYTHONPATH=/opt/sitescripts
+python -m sitescripts.extensions.bin.updateUpdateManifests
Wladimir Palant 2014/07/25 09:50:11 No need to export the variable if it is only used
Felix Dahlke 2014/07/25 10:31:15 It's shorter that way, I try to stick to 80 chars.
+
+rm -f "$run_file"
« modules/updateserver/manifests/init.pp ('K') | « modules/updateserver/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld