mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Merge pull request #877 from alphagov/update-daily-performance-job-4am
Update daily performance job 4am
This commit is contained in:
@@ -42,6 +42,7 @@ def extract_notify_config(notify_config):
|
|||||||
os.environ['ADMIN_CLIENT_SECRET'] = notify_config['credentials']['admin_client_secret']
|
os.environ['ADMIN_CLIENT_SECRET'] = notify_config['credentials']['admin_client_secret']
|
||||||
os.environ['SECRET_KEY'] = notify_config['credentials']['secret_key']
|
os.environ['SECRET_KEY'] = notify_config['credentials']['secret_key']
|
||||||
os.environ['DANGEROUS_SALT'] = notify_config['credentials']['dangerous_salt']
|
os.environ['DANGEROUS_SALT'] = notify_config['credentials']['dangerous_salt']
|
||||||
|
os.environ['PERFORMANCE_PLATFORM_TOKEN'] = notify_config['credentials'].get('performance_platform_token')
|
||||||
|
|
||||||
|
|
||||||
def extract_notify_aws_config(aws_config):
|
def extract_notify_aws_config(aws_config):
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class Config(object):
|
|||||||
EXPIRE_CACHE_IN_SECONDS = 600
|
EXPIRE_CACHE_IN_SECONDS = 600
|
||||||
|
|
||||||
# Performance platform
|
# Performance platform
|
||||||
PERFORMANCE_PLATFORM_ENABLED = os.getenv('PERFORMANCE_PLATFORM_ENABLED') == '1'
|
PERFORMANCE_PLATFORM_ENABLED = False
|
||||||
PERFORMANCE_PLATFORM_URL = 'https://www.performance.service.gov.uk/data/govuk-notify/notifications'
|
PERFORMANCE_PLATFORM_URL = 'https://www.performance.service.gov.uk/data/govuk-notify/notifications'
|
||||||
PERFORMANCE_PLATFORM_TOKEN = os.getenv('PERFORMANCE_PLATFORM_TOKEN')
|
PERFORMANCE_PLATFORM_TOKEN = os.getenv('PERFORMANCE_PLATFORM_TOKEN')
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ class Config(object):
|
|||||||
},
|
},
|
||||||
'send-daily-performance-platform-stats': {
|
'send-daily-performance-platform-stats': {
|
||||||
'task': 'send-daily-performance-platform-stats',
|
'task': 'send-daily-performance-platform-stats',
|
||||||
'schedule': crontab(minute=30, hour=0), # 00:30
|
'schedule': crontab(minute=0, hour=4), # 04:00
|
||||||
'options': {'queue': 'periodic'}
|
'options': {'queue': 'periodic'}
|
||||||
},
|
},
|
||||||
'switch-current-sms-provider-on-slow-delivery': {
|
'switch-current-sms-provider-on-slow-delivery': {
|
||||||
@@ -244,6 +244,7 @@ class Live(Config):
|
|||||||
FROM_NUMBER = '40604'
|
FROM_NUMBER = '40604'
|
||||||
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = '6c1d81bb-dae2-4ee9-80b0-89a4aae9f649'
|
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = '6c1d81bb-dae2-4ee9-80b0-89a4aae9f649'
|
||||||
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = 'ba9e1789-a804-40b8-871f-cc60d4c1286f'
|
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = 'ba9e1789-a804-40b8-871f-cc60d4c1286f'
|
||||||
|
PERFORMANCE_PLATFORM_ENABLED = True
|
||||||
|
|
||||||
|
|
||||||
class CloudFoundryConfig(Config):
|
class CloudFoundryConfig(Config):
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ def notify_config():
|
|||||||
'admin_client_secret': 'admin client secret',
|
'admin_client_secret': 'admin client secret',
|
||||||
'secret_key': 'secret key',
|
'secret_key': 'secret key',
|
||||||
'dangerous_salt': 'dangerous salt',
|
'dangerous_salt': 'dangerous salt',
|
||||||
|
'performance_platform_token': 'performance platform token'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,6 +147,7 @@ def test_notify_config():
|
|||||||
assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret'
|
assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret'
|
||||||
assert os.environ['SECRET_KEY'] == 'secret key'
|
assert os.environ['SECRET_KEY'] == 'secret key'
|
||||||
assert os.environ['DANGEROUS_SALT'] == 'dangerous salt'
|
assert os.environ['DANGEROUS_SALT'] == 'dangerous salt'
|
||||||
|
assert os.environ['PERFORMANCE_PLATFORM_TOKEN'] == 'performance platform token'
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')
|
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')
|
||||||
|
|||||||
Reference in New Issue
Block a user