Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01a7226

Browse files
authored
Merge pull request alphagov#221 from alphagov/mapit-traffic-replay-script
Change Mapit traffic replay script
2 parents dfa3a4d + eb9b1b3 commit 01a7226

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mapit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def _restart_mapit_services():
5151
def check_database_upgrade():
5252
"""Replay yesterday's Mapit requests to ensure that a database upgrade works"""
5353

54-
sudo("awk '$9==200 {print \"http://localhost\" $7}' /var/log/nginx/mapit.access.log.1 > mapit-200s")
55-
sudo("awk '$9==404 {print \"http://localhost\" $7}' /var/log/nginx/mapit.access.log.1 > mapit-404s")
56-
sudo("awk '$9==302 {print \"http://localhost\" $7}' /var/log/nginx/mapit.access.log.1 > mapit-302s")
54+
sudo("awk '$9==200 {print \"http://localhost\" $7}' /var/log/nginx/mapit.publishing.service.gov.uk-access.log.1 > mapit-200s")
55+
sudo("awk '$9==404 {print \"http://localhost\" $7}' /var/log/nginx/mapit.publishing.service.gov.uk-access.log.1 > mapit-404s")
56+
sudo("awk '$9==302 {print \"http://localhost\" $7}' /var/log/nginx/mapit.publishing.service.gov.uk-access.log.1 > mapit-302s")
5757

5858
print "Replaying Mapit 200s. Ensure that they are all still 200s."
5959
print "NOTE: Some 404s may result if internal ids have changed because /area/<code> will redirect to /area/<internal-id> - this should be a low number and for /area/ urls only"

0 commit comments

Comments
 (0)