Skip to content

Commit

Permalink
Refactor to prevent secretariat recordings entry page from timing out.
Browse files Browse the repository at this point in the history
…Fixes #2287.  Commit ready for merge

 - Legacy-Id: 13275
  • Loading branch information
rpcross committed May 8, 2017
1 parent 6b7bb57 commit 462fc1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ietf/secr/proceedings/views.py
Expand Up @@ -77,8 +77,11 @@ def get_unmatched_recordings(meeting):
files = os.listdir(path)
except OSError:
files = []
url = settings.IETF_AUDIO_URL + 'ietf%s' % meeting.number
recordings = Document.objects.filter(type='recording',external_url__startswith=url)
filenames = [ d.external_url.split('/')[-1] for d in recordings ]
for file in files:
if not Document.objects.filter(external_url__endswith=file).exists():
if file not in filenames:
unmatched_recordings.append(file)
return unmatched_recordings

Expand Down

0 comments on commit 462fc1a

Please sign in to comment.