Merge ~cjwatson/launchpad:gunicorn-scandir into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 7faa4553477a49ebb6bcd6a639953c5c044ea475
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:gunicorn-scandir
Merge into: launchpad:master
Diff against target: 22 lines (+3/-1)
1 file modified
configs/development/gunicorn.conf.py (+3/-1)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+404414@code.launchpad.net

Commit message

Speed up gunicorn startup using scandir.walk

Description of the change

The rest of Launchpad already uses this (see https://code.launchpad.net/~cjwatson/launchpad/scandir/+merge/345139).

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/configs/development/gunicorn.conf.py b/configs/development/gunicorn.conf.py
2index 2c914aa..0576e0d 100644
3--- a/configs/development/gunicorn.conf.py
4+++ b/configs/development/gunicorn.conf.py
5@@ -1,6 +1,8 @@
6 from fnmatch import fnmatch
7 import os
8
9+import scandir
10+
11
12 BASE_DIR = os.path.realpath(
13 os.path.join(os.path.dirname(__file__), '..', '..'))
14@@ -11,7 +13,7 @@ def find_files(directory, pattern):
15 """Find files in `directory` matching `pattern`.
16 """
17 result = []
18- for root, dirs, files in os.walk(directory):
19+ for root, dirs, files in scandir.walk(directory):
20 for basename in files:
21 matches = fnmatch(basename, pattern)
22 if matches:

Subscribers

People subscribed via source and target branches

to status/vote changes: