From ad410e308ea40306cdfd4b4505a870d70ca43b58 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 11 Aug 2013 02:15:26 -0700 Subject: [PATCH] jobd.pl: do not attempt to update if .clone_failed exists Previously if .clone_failed existed but .clone_in_progress did not then an update would still be attempted. Instead do not attempt any update when .clone_failed exists. --- jobd/jobd.pl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/jobd/jobd.pl b/jobd/jobd.pl index acab3c3..3028b4a 100755 --- a/jobd/jobd.pl +++ b/jobd/jobd.pl @@ -40,16 +40,16 @@ sub update_project { job_skip($job); return setup_gc($job); } - if (-e get_project_path($p).".clone_in_progress") { - if (-e get_project_path($p).".clone_failed") { - job_skip($job, "initial mirroring failed"); - # Still need to gc non top-level clones even if they've failed - # otherwise the objects copied into them from the parent will - # just accumulate without bound - setup_gc($job) if $p =~ m,/,; - } else { - job_skip($job, "initial mirroring not complete yet"); - } + if (-e get_project_path($p).".clone_in_progress" && ! -e get_project_path($p).".clone_failed") { + job_skip($job, "initial mirroring not complete yet"); + return; + } + if (-e get_project_path($p).".clone_failed") { + job_skip($job, "initial mirroring failed"); + # Still need to gc non top-level clones even if they've failed + # otherwise the objects copied into them from the parent will + # just accumulate without bound + setup_gc($job) if $p =~ m,/,; return; } if (my $ts = is_operation_uptodate($p, 'lastrefresh', rand_adjust($Girocco::Config::min_mirror_interval))) { -- 2.11.4.GIT