]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Clear state after performing aggregation, since it could hypothetically
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 21 May 2007 02:59:06 +0000 (02:59 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 21 May 2007 02:59:06 +0000 (02:59 +0000)
change after the lock is dropped, and before the lock is regained by the
build process. The state will now be reloaded by the build process.

IkiWiki/Plugin/aggregate.pm

index 082290114fa8a382a133f6cfbcb2d8065c40eaca..5024975ac8603223191b9a36525c6a650d6bec77 100644 (file)
@@ -41,6 +41,7 @@ sub checkconfig () { #{{{
                aggregate();
                expire();
                savestate();
                aggregate();
                expire();
                savestate();
+               clearstate();
 
                IkiWiki::unlockwiki();
        }
 
                IkiWiki::unlockwiki();
        }
@@ -207,6 +208,12 @@ sub savestate () { #{{{
                error("rename $newfile: $!", $cleanup);
 } #}}}
 
                error("rename $newfile: $!", $cleanup);
 } #}}}
 
+sub clearstate () { #{{{
+       %feeds=();
+       %guids=();
+       $state_loaded=0;
+} #}}}
+
 sub expire () { #{{{
        foreach my $feed (values %feeds) {
                next unless $feed->{expireage} || $feed->{expirecount};
 sub expire () { #{{{
        foreach my $feed (values %feeds) {
                next unless $feed->{expireage} || $feed->{expirecount};