[PATCH] Update cron jobs for docs site

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 modules/fedora-docs/files/docs-sync   |   28 ----------------------------
 modules/fedora-docs/manifests/init.pp |   11 +++++------
 2 files changed, 5 insertions(+), 34 deletions(-)

diff --git a/modules/fedora-docs/files/docs-sync b/modules/fedora-docs/files/docs-sync
index 9425ec3..8eacbfb 100755
--- a/modules/fedora-docs/files/docs-sync
+++ b/modules/fedora-docs/files/docs-sync
@@ -1,32 +1,5 @@
 #!/bin/sh                                                                                  
 
-function cleanlock()
-{                   
-    /bin/rm -f /var/lock/$1.lock
-}                               
-
-
-function quit()
-{              
-    echo $1
-    if [ $2 ]
-    then
-        cleanlock $2
-    fi
-    exit 2
-}
-
-function newlock()
-{
-    if [ -f /var/lock/$1.lock ]
-    then
-        quit "Lockfile exists.. Remove /var/lock/$1.lock"
-    else
-        touch /var/lock/$1.lock
-    fi
-}
-
-newlock docSync
 if [ ! -d /srv/web/docs ]
 then
 	echo "/srv/web/docs missing"
@@ -40,4 +13,3 @@ git reset --hard
 git pull
 
 /sbin/restorecon -R /srv/web/docs/
-cleanlock docSync
diff --git a/modules/fedora-docs/manifests/init.pp b/modules/fedora-docs/manifests/init.pp
index 3055428..28fb8da 100644
--- a/modules/fedora-docs/manifests/init.pp
+++ b/modules/fedora-docs/manifests/init.pp
@@ -9,11 +9,10 @@ class fedora-docs::build {
     }
 
     cron { "docs-sync":
-        command => "/usr/local/bin/docs-sync > /dev/null 2>&1",
+        command => "lock-wrapper docs-sync /usr/local/bin/docs-sync > /dev/null 2>&1",
         user    => "root",
-        minute  => 5,
-        hour    => [ 1, 7, 14, 21 ],
-	ensure	=> absent,
+        minute  => [ 4, 14, 24, 34, 44, 54 ],
+	ensure	=> present,
     }
 }
 
@@ -25,8 +24,8 @@ define fedora-docs::proxy($website) {
         # TODO: Make add some locking to this.
         command => "/usr/bin/rsync -a bapp01::docs/* /srv/web/docs.fedoraproject.org/",
         user    => "root",
-        minute  => [ 0, 30 ],
-	ensure	=> absent,
+        minute  => [ 7, 17, 27, 37, 47, 57 ],
+	ensure	=> present,
     }
 
     file { "/etc/httpd/conf.d/$website/fedora-docs.conf":
-- 
1.5.5.6

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux