Merge branch 'master' of github.com:alphagov/notifications-api

This commit is contained in:
Rebecca Law
2020-07-22 09:25:05 +01:00
2 changed files with 37 additions and 5 deletions

View File

@@ -144,8 +144,8 @@ class Config(object):
# these should always add up to 100%
SMS_PROVIDER_RESTING_POINTS = {
'mmg': 50,
'firetext': 50
'mmg': 70,
'firetext': 30
}
NOTIFY_SERVICE_ID = 'd6aa2c68-a2d9-4437-ab19-3ae8eb202553'
@@ -459,7 +459,7 @@ class Preview(Config):
INVALID_PDF_BUCKET_NAME = 'preview-letters-invalid-pdf'
TRANSIENT_UPLOADED_LETTERS = 'preview-transient-uploaded-letters'
LETTER_SANITISE_BUCKET_NAME = 'preview-letters-sanitise'
CBC_PROXY_URL = 'https://notify-stub-cbc-sandbox.cloudapps.digital'
CBC_PROXY_URL = 'https://notify-stub-cbc-preview.cloudapps.digital'
FROM_NUMBER = 'preview'
API_RATE_LIMIT_ENABLED = True
CHECK_PROXY_HEADER = False
@@ -477,7 +477,7 @@ class Staging(Config):
INVALID_PDF_BUCKET_NAME = 'staging-letters-invalid-pdf'
TRANSIENT_UPLOADED_LETTERS = 'staging-transient-uploaded-letters'
LETTER_SANITISE_BUCKET_NAME = 'staging-letters-sanitise'
CBC_PROXY_URL = 'https://notify-stub-cbc-sandbox.cloudapps.digital'
CBC_PROXY_URL = 'https://notify-stub-cbc-staging.cloudapps.digital'
FROM_NUMBER = 'stage'
API_RATE_LIMIT_ENABLED = True
CHECK_PROXY_HEADER = True
@@ -496,7 +496,7 @@ class Live(Config):
INVALID_PDF_BUCKET_NAME = 'production-letters-invalid-pdf'
TRANSIENT_UPLOADED_LETTERS = 'production-transient-uploaded-letters'
LETTER_SANITISE_BUCKET_NAME = 'production-letters-sanitise'
CBC_PROXY_URL = 'https://notify-stub-cbc-sandbox.cloudapps.digital'
CBC_PROXY_URL = 'https://notify-stub-cbc-production.cloudapps.digital'
FROM_NUMBER = 'GOVUK'
PERFORMANCE_PLATFORM_ENABLED = True
API_RATE_LIMIT_ENABLED = True

View File

@@ -0,0 +1,32 @@
"""
Revision ID: 0325_int_letter_rates_fix
Revises: 0324_int_letter_rates
Create Date: 2020-07-15 10:09:17.218183
"""
from datetime import datetime
from alembic import op
from sqlalchemy.sql import text
revision = '0325_int_letter_rates_fix'
down_revision = '0324_int_letter_rates'
old_start_date = datetime(2020, 7, 1, 0, 0)
new_start_date = datetime(2020, 6, 30, 23, 0)
def upgrade():
conn = op.get_bind()
conn.execute(text(
"""UPDATE letter_rates SET start_date = :new_start_date WHERE start_date = :old_start_date"""
), new_start_date=new_start_date, old_start_date=old_start_date)
def downgrade():
conn = op.get_bind()
conn.execute(text(
"""UPDATE letter_rates SET start_date = :old_start_date WHERE start_date = :new_start_date"""
), old_start_date=old_start_date, new_start_date=new_start_date)