Imdad Ahad
9fbd43c072
Serialise notifications for csv separately:
...
* Introduces separate method on Notification to serialise the notification
* ready for csv output
* Fixes issue where job_row_number = 0 not being accounted for correctly
2017-04-20 11:52:00 +01:00
Leo Hemsted
67002cd608
Merge pull request #905 from alphagov/letter-scheduled-task
...
exclude letters from scheduled cleanup tasks
2017-04-19 16:19:44 +01:00
Leo Hemsted
935e566284
add tests for letters not getting excluded
2017-04-19 14:22:25 +01:00
Ken Tsang
4a63a337b2
Removed slash from v2 get all templates route
2017-04-19 12:38:58 +01:00
Leo Hemsted
b381aeefa1
don't include letters when timing out/deleting old notifications
...
also refactored those functions, since they were pretty gnarly and
repeated themselves a lot
2017-04-19 11:34:00 +01:00
Ken Tsang
fc0cfa5dbf
Corrected code to handle template types
2017-04-19 10:51:12 +01:00
Ken Tsang
c33b876c66
Remove get all template print
2017-04-19 10:51:12 +01:00
Ken Tsang
a5e514c356
Refactored to use template response as template
2017-04-19 10:51:12 +01:00
Ken Tsang
d290a2e0ad
Removed paging from get all templates
2017-04-19 10:51:12 +01:00
Ken Tsang
cb7cd233d1
Rrefactored schema
2017-04-19 10:51:12 +01:00
Ken Tsang
89e244ccd2
First commit
2017-04-19 10:51:12 +01:00
Ken Tsang
f5da3574b5
Add get all templates schema
2017-04-19 10:51:12 +01:00
minglis
ddda2bd158
Merge pull request #902 from alphagov/task-to-set-job-to-error
...
Task to set job to error
2017-04-18 16:07:32 +01:00
Martyn Inglis
8956338d31
Add a new task to update a job to error - note it leaves the notifications in whatever state they were in.
2017-04-18 11:42:48 +01:00
Martyn Inglis
81f0942f57
Merge branch 'master' into update-the-notification-with-dvla-id
...
Conflicts:
requirements.txt
2017-04-18 11:21:26 +01:00
Martyn Inglis
b8cfaf02f6
Ordered the query - ambiguous orders made tests flaky
2017-04-13 12:52:30 +01:00
Martyn Inglis
b0e5062df2
Added the random string reference to the letter
...
- uses the reference field on the notifications table to store a 16char random string used to cross reference DVLA letters back to the notification
- used as letter barcode does not have space for a UUID notification id
Depends on https://github.com/alphagov/notifications-utils/pull/149
Renamed the numeric_id to notification_reference in utils and changed validation rules to match this
Note also the persist_notification method set "reference" to be "client_reference" which is confusing and they are different things, so fixed this too.
2017-04-12 17:56:55 +01:00
kentsanggds
39ed760708
Merge pull request #898 from alphagov/update-letter-jobs
...
Update letter jobs
response changed to 201
2017-04-11 17:07:12 +01:00
kentsanggds
50ee6d98cd
Merge pull request #892 from alphagov/v2-preview-subject-personalisation
...
V2 preview subject personalisation
2017-04-11 17:05:23 +01:00
Ken Tsang
8792461998
Changed response to 201 for send_letter_jobs
2017-04-11 16:42:08 +01:00
Ken Tsang
ccd25382ea
Refactored post template
2017-04-11 16:37:30 +01:00
Ken Tsang
7c0aeca66e
Removed unused imports
2017-04-11 16:19:43 +01:00
Ken Tsang
06ec7a59a6
Refactored code to personalise subject
2017-04-11 16:19:43 +01:00
Ken Tsang
eba88b08c5
Removed URI from preview response
2017-04-11 16:19:43 +01:00
Leo Hemsted
b55b1007d0
Merge pull request #897 from alphagov/fix-slow-delete
...
remove slow join from template-last-use query
2017-04-11 16:03:21 +01:00
Ken Tsang
ad6bdbcc97
Removed redundant json import
2017-04-11 15:52:47 +01:00
Ken Tsang
155e173363
Update send letter jobs to return json
2017-04-11 15:44:33 +01:00
Rebecca Law
e022fe0403
Update build_dvla_file with a mocked notify_celery.send_task.
...
Check the task is being called with the right parameters.
2017-04-11 11:13:47 +01:00
Leo Hemsted
c7c47a029f
remove slow join from template-last-use query
2017-04-10 17:33:31 +01:00
Rebecca Law
6949779544
Refactor s3upload
...
s3upload function has been moved to notifications-utils.
https://github.com/alphagov/notifications-utils/pull/138 must be merge first.
Remove scratch code that I was using to test celery.send_task method
Revert the update to default_retry_delay.
Increase the countdown, wait 1 minute before executing the task.
Some of the changes in my previous commit are included here, that branch will be merged before this one, so it will make sense.
Update version of notification_utils
Update the version of notifications-utils
2017-04-10 17:17:58 +01:00
Rebecca Law
65a91c440b
Refactor s3upload
...
s3upload function has been moved to notifications-utils.
https://github.com/alphagov/notifications-utils/pull/138 must be merge first.
2017-04-10 17:12:56 +01:00
Rebecca Law
7ba9b1d261
Update the update statements with the updated_at and sent_at timestamps.
2017-04-07 15:21:27 +01:00
Rebecca Law
2d9a449d1e
Changed styling
2017-04-07 14:36:00 +01:00
Rebecca Law
f7ab49246a
Added an endpoint that returns all letter jobs, ordered by created_at desc.
2017-04-07 11:50:56 +01:00
Rebecca Law
61d228e797
Remove test filter
2017-04-07 11:22:03 +01:00
Rebecca Law
50a5bedcbf
Refactor update to notifcations to be a bulk update. This is much better for performance.
2017-04-07 10:59:12 +01:00
Rebecca Law
add0cfa62f
Add a task for the FTP app to call that will update the job to sent to dvla and all the notifications for that job as sending.
2017-04-06 17:16:08 +01:00
Rebecca Law
895b5d13dd
Merge pull request #891 from alphagov/api-to-start-dvla-file-sending
...
Api to start dvla file sending
2017-04-06 15:35:15 +01:00
Rebecca Law
a9e429b09f
Fix task name, should have dashes not underscores
2017-04-06 15:26:50 +01:00
Rebecca Law
1d46dd0be1
Remove bucket-name from the task.
2017-04-06 15:03:06 +01:00
Rebecca Law
b6abb82212
Merge pull request #887 from alphagov/update-job-status
...
Update job status for letter jobs.
2017-04-06 14:22:09 +01:00
Rebecca Law
24c871179d
Merge pull request #885 from alphagov/platform-admin-query
...
Platform admin query
2017-04-06 13:58:34 +01:00
Rebecca Law
7bd0a07f0d
Added bucket name to task arguments.
2017-04-06 12:18:34 +01:00
Rebecca Law
970a4e7b4e
New endpoint to send a list of job ids to a queue.
...
The task will be picked up by the FTP app. Given the list of job ids the tasks will get all the files from s3, aggregate them then send to dvla
2017-04-06 12:14:17 +01:00
Rebecca Law
9e175f42e8
Refactor to make code more readible.
2017-04-06 11:18:21 +01:00
Rebecca Law
4f6a66c904
Merge branch 'master' into update-job-status
...
Conflicts:
app/dao/jobs_dao.py
tests/app/dao/test_jobs_dao.py
2017-04-06 11:11:37 +01:00
minglis
29c84d73ff
Merge pull request #889 from alphagov/restrict-delete-files-job-query
...
Updates to the delete CSV file job to reduce the number jobs included in any run.
2017-04-06 10:09:49 +01:00
minglis
4d5e697f1c
Merge pull request #888 from alphagov/throw-exception-on-long-running-client-call
...
Throw exception on long running client call
2017-04-06 09:24:26 +01:00
Martyn Inglis
bce75ae0db
Bump timeout on research mode to match normal behaviour
2017-04-05 16:39:46 +01:00
Martyn Inglis
832005efef
Updates to the delete CSV file job to reduce the number of eligible jobs in any run
...
- previously this was unbounded, so it got all jobs older then 7 days. In excess of 75,000 🔥
- this meant that the job took (a) a long time and (b) a lot memory and (c) doing the same thing every day
These changes mean that the job has a 2 day eligible window for jobs, minimising the number of eligible jobs in a run, whilst still retaining some leeway in event if it failing one night.
In principle the job runs early morning on a given day. The previous 7 days are left along, and then the previous 2 days worth of files are deleted:
so:
runs on
31st
30,29,28,27,26,25,24 are ignored
23,22 jobs here have files deleted
21 and earlier are ignored.
2017-04-05 16:23:41 +01:00