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

Proposed by Colin Watson
Status: Merged
Merged at revision: 18474
Proposed branch: lp:~cjwatson/launchpad/sorted-apache-logs
Merge into: lp:launchpad
Diff against target: 18 lines (+2/-2)
1 file modified
lib/lp/services/apachelogparser/script.py (+2/-2)
To merge this branch: bzr merge lp:~cjwatson/launchpad/sorted-apache-logs
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+331809@code.launchpad.net

Commit message

Parse Apache log files in sorted order.

Description of the change

This makes behaviour a bit more predictable when catching up with a large backlog.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/services/apachelogparser/script.py'
2--- lib/lp/services/apachelogparser/script.py 2014-01-30 15:04:06 +0000
3+++ lib/lp/services/apachelogparser/script.py 2017-10-04 19:14:46 +0000
4@@ -1,4 +1,4 @@
5-# Copyright 2009 Canonical Ltd. This software is licensed under the
6+# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
7 # GNU Affero General Public License version 3 (see the file LICENSE).
8
9 __metaclass__ = type
10@@ -77,7 +77,7 @@
11 # disappears before we get around to parsing it, which is
12 # desirable behaviour.
13 files_to_parse = list(get_files_to_parse(
14- glob.glob(os.path.join(self.root, self.log_file_glob))))
15+ sorted(glob.glob(os.path.join(self.root, self.log_file_glob)))))
16
17 country_set = getUtility(ICountrySet)
18 parsed_lines = 0