improve messages
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 21 May 2007 03:00:45 +0000 (03:00 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 21 May 2007 03:00:45 +0000 (03:00 +0000)
IkiWiki.pm
IkiWiki/Plugin/aggregate.pm

index 31e175d2ac7195ac7f49f80d50f49c0a67dba7e3..1cfa419b6f614762a580f1e5aa702b4f4ae0d08f 100644 (file)
@@ -689,7 +689,6 @@ sub lockwiki (;$) { #{{{
                        error("wiki is locked; waited $wait seconds without lock being freed (possible stuck process or stale lock?)");
                }
                else {
-                       debug("wiki is locked");
                        return 0;
                }
        }
index 5024975ac8603223191b9a36525c6a650d6bec77..eb5067d9f5977cafea958e6e5849c4fd866a34c1 100644 (file)
@@ -33,8 +33,10 @@ sub getopt () { #{{{
 sub checkconfig () { #{{{
        if ($config{aggregate} && ! ($config{post_commit} && 
                                     IkiWiki::commit_hook_enabled())) {
-               # don't wait for the lock
-               IkiWiki::lockwiki(0) || exit 1;
+               if (! IkiWiki::lockwiki(0)) {
+                       debug("wiki is locked by another process, not aggregating");
+                       exit 1;
+               }
        
                loadstate();
                IkiWiki::loadindex();