Rebecca Law
39e4f63b8c
Use the positive condition when checking the environment
2018-04-06 12:01:16 +01:00
Ken Tsang
8b35c1c007
Fix research mode preview of precompiled letters
2018-04-03 22:52:45 +01:00
Sakis
dce24147a6
Merge pull request #1814 from alphagov/bump-db-connections
...
Increase pool size to 15 permanent connections
2018-04-03 16:17:21 +01:00
kentsanggds
a0f74b35e1
Merge pull request #1813 from alphagov/ken-hide-notify-tag-on-first-page
...
Hide notify tag on first page
2018-04-03 15:40:54 +01:00
Richard Chapman
82274123f4
Merge pull request #1817 from alphagov/rc_add_virus_scan_error_task
...
Logging refactor to make debugging Antivirus scans easier
2018-04-03 14:17:15 +01:00
Chris Hill-Scott
c392053847
Merge pull request #1816 from alphagov/bump-utils-asterisks
...
Bump utils to 25.2.3
2018-04-03 13:07:51 +01:00
Richard Chapman
f1abce22ae
Logging refactor to make debugging easier. Before the filename needed to
...
be known. Added the notification id to the logging message so that
the notification can be traced through the logging system by knowing
the notification id, making it easier to debug. Also changed to raise an
exception so that alerts are generated. This way we should get an email
to say that there has been an error.
2018-04-03 12:31:52 +01:00
Chris Hill-Scott
c9b297a3d4
Bump utils to 25.2.3
...
To bring in:
- [x] https://github.com/alphagov/notifications-utils/pull/436
Changes:
- https://github.com/alphagov/notifications-utils/compare/25.2.2...25.2.3
2018-04-03 12:10:45 +01:00
Sakis
f06bd20900
Merge pull request #1809 from alphagov/revisit-proxy-header-check
...
Revisit proxy header check
2018-04-03 10:55:41 +01:00
Athanasios Voutsadakis
8f1f546f69
Increase pool size to 15 permanent connections
...
At the same time, decrease the number of workers from 5 to 4.
Effect on max db connections will be the same - although with a higher
"resting" number of connections.
Before:
12 (instances) * 5 (workers) * 20 (10 permanent + 10 overflow) = 1200
After:
12 (instances) * 4 (workers) * 25 (15 permanent + 10 overflow) = 1200
2018-03-29 14:57:19 +01:00
Ken Tsang
7524402b56
Only hide the notify tag on precompiled on first page
2018-03-29 14:38:38 +01:00
Ken Tsang
0e6907aba7
Refactor letter utils tests
...
- tests were failing as creating duplicate buckets
2018-03-29 14:28:06 +01:00
Chris Hill-Scott
54fe9ba275
Merge pull request #1794 from alphagov/pyup-update-pytest-3.4.2-to-3.5.0
...
Update pytest to 3.5.0
2018-03-29 13:46:28 +01:00
Venus Bailey
2dc663018e
Merge pull request #1812 from alphagov/vb-report-tasks
...
Bug fix: use date only when comparing unique records rather than date…
2018-03-29 11:47:49 +01:00
venusbb
52aeec2247
bug fix: use date only when comparing unique records rather than datetime
2018-03-29 11:42:31 +01:00
Venus Bailey
998863514e
Merge pull request #1810 from alphagov/vb-report-tasks
...
Alter primary key for ft_billing table to include international
2018-03-28 16:17:14 +01:00
venusbb
71bf1fb774
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-report-tasks
2018-03-28 16:11:00 +01:00
venusbb
3ec68435ff
add international as a composite primary key for billing
2018-03-28 16:09:06 +01:00
Athanasios Voutsadakis
331500ce94
Merge branch 'master' into revisit-proxy-header-check
2018-03-28 15:38:56 +01:00
Venus Bailey
a883fc54d8
Merge pull request #1807 from alphagov/vb-report-tasks
...
Billing database tweak and BST bug fix
2018-03-28 11:01:18 +01:00
venusbb
cf766313e6
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-report-tasks
2018-03-28 10:53:45 +01:00
venusbb
83aa1b9fa3
use datetime.combine rather than parser.parse
2018-03-28 10:52:37 +01:00
Athanasios Voutsadakis
6f1e4c76d5
Make test context managers more reliable
...
Sometimes, when a test using one of the set_config[_values] context managers
failed or raised an exception it would cause the context to not be able
to revert its config changes, resulting in a 'spooky action at a
distance' where random tests would start to fail for non-obvious reasons.
2018-03-27 17:41:05 +01:00
Athanasios Voutsadakis
463f1eefaf
Move proxy header check to auth-requiring endpoints
...
The main drive behind this is to allow us to enable http healthchecks on
the `/_status` endpoint. The healthcheck requests are happening directly
on the instances without going to the proxy to get the header properly
set.
In any case, endpoints like `/_status` should be generally accessible by
anything without requiring any form of authorization.
2018-03-27 17:37:09 +01:00
Chris Hill-Scott
45aca51d4d
Merge pull request #1808 from alphagov/no-entities-plain-text
...
Don’t show HTML entities in plain text emails
2018-03-27 15:31:47 +01:00
Chris Hill-Scott
eebd754a58
Don’t show HTML entities in plain text emails
...
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/427
2018-03-27 14:44:41 +01:00
Rebecca Law
63e85e3511
Merge pull request #1806 from alphagov/update-logging
...
Update logging for provider tasks.
2018-03-27 14:04:12 +01:00
Richard Chapman
20179af6e6
Merge pull request #1802 from alphagov/rc_add_virus_scan_error_task
...
Added a new task to handle any error cases with the anti-virus
2018-03-27 14:03:24 +01:00
Richard Chapman
023862dfdc
Refactored code to be more Pythonic and make the code more readable
2018-03-27 13:32:46 +01:00
venusbb
2262db4f62
Database tweak and BST bug fix
2018-03-27 10:37:56 +01:00
Richard Chapman
3299055a09
Refactored the shared code between
...
move_scanned_pdf_to_test_or_live_pdf_bucket and
move_failed_pdf to consolidate some code so it is easier to maintain in
future as so that _move_s3_object can be used for any new methods.
2018-03-27 10:32:40 +01:00
Alexey Bezhan
c02b112e9b
Merge pull request #1803 from alphagov/upload-document-service-permission
...
Add a service permission for uploading documents to Document Download
2018-03-27 10:21:47 +01:00
Alexey Bezhan
04a643a777
Add a service permission for uploading documents to Document Download
...
Service permission allows attaching a file to a notification API request
that gets uploaded to Document Download API.
2018-03-27 10:16:56 +01:00
Rebecca Law
c75458cee9
Revert change to exception log.
2018-03-26 16:44:29 +01:00
Rebecca Law
598539dcb3
Update logging for provider tasks.
...
Move the info message before the fetch.
Include the exception in the log message.
2018-03-26 15:24:21 +01:00
Richard Chapman
8b6d28d3b0
Added a new task to handle any error cases with the anti-virus
...
application. If the Anti-virus app fails due to s3 errors or ClamAV
so does not scan (even after retries) the file at all an error needs
to be raised and the notification set to technical-failure.
Files should be moved to a 'folder' a separate one for ERROR and FAILURE.
* Added new letter task to process the error
* Added a new method to letter utils.py to move a file into an error or
failure folder based on the input
* Added tests to test the task and the utils.py method
2018-03-26 14:18:44 +01:00
Chris Hill-Scott
30d1f38e52
Merge pull request #1798 from alphagov/54px-branding
...
Update utils to fix size of non-gov logos
2018-03-26 14:13:07 +01:00
Rebecca Law
bdae669b05
Merge pull request #1800 from alphagov/replay-created-emails
...
Replay emails and sms that are still in created
2018-03-26 10:56:55 +01:00
Rebecca Law
acfb1305f4
Fix test
2018-03-26 10:51:38 +01:00
Rebecca Law
0701b2546d
Remove test crontab minute
2018-03-26 10:30:08 +01:00
Rebecca Law
9549ada200
Run task every 15 minutes.
...
Move variable to task from config.
2018-03-26 10:26:24 +01:00
Sakis
2ee48b5d4c
Merge pull request #1799 from alphagov/python-3.5
...
Update Python version to match PaaS
2018-03-26 10:22:13 +01:00
Rebecca Law
612843d509
Run every 15 minutes not 15 minutes past the hour
2018-03-26 09:43:53 +01:00
Rebecca Law
28e78780d0
Added more logging for provider tasks.
2018-03-26 09:31:52 +01:00
Rebecca Law
b977860a4e
Merge pull request #1801 from alphagov/command-to-create-pdf-letter
...
New command to create-pdf-letter task for a given notification id.
2018-03-23 16:20:04 +00:00
Rebecca Law
fc21121764
Check input is a UUID
2018-03-23 16:11:43 +00:00
Rebecca Law
40e535e112
Add the scheduled task to run every 15 minutes.
2018-03-23 16:00:13 +00:00
Rebecca Law
6dad9b43db
New command to create-pdf-letter task for a given notification id.
...
After a notificaiton is created we create a task to create the pdf and save it to S3,
if for some reason that task does not run we are left with notifications that are not sent.
This should not happen, but if it does we have a way to continue sending the letter.
2018-03-23 15:47:01 +00:00
Rebecca Law
f596d17bf2
If a sms or email has not been sent after 4 hours and 15 minutes then put it on the delivery queue.
2018-03-23 15:38:35 +00:00
Chris Hill-Scott
d28aa9080a
Update Python version to match PaaS
2018-03-23 15:36:50 +00:00