On Thu, Jun 28, 2012 at 10:50 AM, Zdenek Pavlas <[email protected]> wrote: >> + cb_obj = (self._mirrorFailureHandler, ({},), {}) >> self._grab = mgclass(self._grabfunc, urls, >> - failure_callback=self.mirror_failure_obj) >> + failure_callback=cb_obj) > > This runs once (for each repo) so the 'data' argument is shared. > >> + def _mirrorFailureHandler(self, cb_obj, data): >> + tries = data.get(cb_obj.mirror, 0) >> + if self.retries and tries <= self.retries: >> + action['remove_master'] = action['remove'] = 0 >> + data[cb_obj.mirror] = tries + 1 >> + return action > > You'll retry each mirror configured number of times, but only > for the 1st file requested. Is that intentional? > Anyway, I like the 'skip-but-retry' idea.
Ah, I see. My data dictionary is only getting defined once at the start. I see a couple options: 1) pass this failure_callback as a kw arg to urlgrab instead 2) move this logic to MirrorGroup _______________________________________________ Yum-devel mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/yum-devel
