← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/sorted-apache-logs into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/sorted-apache-logs into lp:launchpad.

Commit message:
Parse Apache log files in sorted order.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/sorted-apache-logs/+merge/331809

This makes behaviour a bit more predictable when catching up with a large backlog.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/sorted-apache-logs into lp:launchpad.
=== modified file 'lib/lp/services/apachelogparser/script.py'
--- lib/lp/services/apachelogparser/script.py	2014-01-30 15:04:06 +0000
+++ lib/lp/services/apachelogparser/script.py	2017-10-04 19:14:46 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2017 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -77,7 +77,7 @@
         # disappears before we get around to parsing it, which is
         # desirable behaviour.
         files_to_parse = list(get_files_to_parse(
-            glob.glob(os.path.join(self.root, self.log_file_glob))))
+            sorted(glob.glob(os.path.join(self.root, self.log_file_glob)))))
 
         country_set = getUtility(ICountrySet)
         parsed_lines = 0


Follow ups