~james-w/udd/management-commands

« back to all changes in this revision

Viewing changes to udd/scripts/mass_import.py

  • Committer: Vincent Ladeuil
  • Date: 2011-12-07 10:10:07 UTC
  • mfrom: (550.1.1 899231-kills-spams-log)
  • Revision ID: v.ladeuil+lp@free.fr-20111207101007-9ek9xs011yfe6r51
Only log real kill attempts

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
        return collected
369
369
 
370
370
    def check_time_quota(self):
371
 
        killed = super(ImportDriver, self).check_time_quota()
372
 
        for t in killed:
373
 
            self.logger.warning("Importing %s killed, timeout %s exceeded\n"
374
 
                                % (t.package_name,
375
 
                                   datetime.timedelta(seconds=t.max_duration)))
 
371
        abusers = super(ImportDriver, self).check_time_quota()
 
372
        for (t, killed) in abusers:
 
373
            if killed:
 
374
                self.logger.warning(
 
375
                    "Importing %s killed, timeout %s exceeded"
 
376
                    % (t.package_name,
 
377
                       datetime.timedelta(seconds=t.max_duration)))
376
378
 
377
379
 
378
380
class Stop(Exception):