Martyn Inglis
bdc1d464bf
Fixed up a few things as per pull request review:
...
- Moved email domain and css bucket into dev config, not default
- deleted duplicated property
- removed unused property
2016-09-08 09:07:43 +01:00
imdadahad
b1013d8d31
Merge pull request #660 from alphagov/update-readme
...
Update README to include additonal instructions
2016-09-07 16:05:24 +01:00
Martyn Inglis
852e207478
Adds new scheduled task to delete CSV files.
...
Deletes files for jobs older than 7 days, matching delete process for the actual notifications
Runs 1 minutes past the hour at midnight, 1 and 2 am.
2016-09-07 15:36:59 +01:00
Martyn Inglis
c3657839e4
New jobs dao method to get jobs that are older than a certain number of days.
...
Used in deleting CSV files scheduled task
2016-09-07 15:36:07 +01:00
Martyn Inglis
f506f6751e
Removed unused import
2016-09-07 15:35:25 +01:00
Martyn Inglis
0ecd6f2737
Removed the 'delete job' tasks from the tasks.py file
...
- this was called after processing a job.
- now to be called on a schedule.
2016-09-07 15:35:12 +01:00
imdadahad
6cbd5396ea
Merge pull request #662 from alphagov/remove-send-notification-tests
...
Remove rate limiting tests
2016-09-07 15:18:44 +01:00
Martyn Inglis
cf107d649f
Merge branch 'master' into write-to-postgres-not-sqs
...
Conflicts:
app/celery/tasks.py
2016-09-07 13:51:21 +01:00
Martyn Inglis
770b0c2838
Update rest end point to wrote to the DB not the queue.
...
We wrote to the queue as a performance optimisation , however dev found it confusing to not have immediate access to the notification as it may be perished some minutes later under periods of load. Additionally we had a couple of DB issues which led to us dropping notifications.
Pushing the DB write to earlier in the flow makes the system a little more robust in the early days, we may want to change this when the traffic increases.
2016-09-07 13:47:22 +01:00
Martyn Inglis
255ffbd7f6
Tasks now use the new builder method to construct the DB object.
2016-09-07 13:45:37 +01:00
Martyn Inglis
99250b2248
Adds a builder method to the notification object.
...
This is used to construct a notification from the sorts of data an API call provides. This is used in both the db-email / db-sms tasks and the notifications rest endpoint to construct the notification DB object.
2016-09-07 13:44:56 +01:00
imdadahad
64645d374a
Merge pull request #665 from alphagov/fix-test-key-external-number-issue
...
Fix test key external number issue
2016-09-07 11:56:22 +01:00
Imdad Ahad
41681ac001
Fix mocker syntax issue
2016-09-07 11:17:27 +01:00
Imdad Ahad
94708bdee8
Fix indentation issue
2016-09-07 11:03:16 +01:00
Imdad Ahad
840b99b277
Fix issue where test key cannot send messages to external numbers
2016-09-07 09:57:20 +01:00
Martyn Inglis
d8bfad1ce7
Added prefix to test env file for completeness
2016-09-07 09:37:45 +01:00
Martyn Inglis
c1b00a5f0c
Simplified the config. Aim is to get the actual secrets in credstash to be env specific, and not the random collection of things we have at the moment.
...
Secret definition also includes env specific things such as URLs / Queue prefixes / URLs for providers and so on.
2016-09-07 09:35:31 +01:00
Martyn Inglis
259fb0cb62
Slightly changed to only unlimited the live services.
...
Logic:
- live services don't check days limit for now
- restricted services check limits
(caveat) simulate keys aren't checking day limit even in restricted mode.
2016-09-06 14:21:36 +01:00
Rebecca Law
727c00af21
Merge pull request #659 from alphagov/update-requirements
...
Update requirements
2016-09-06 14:16:31 +01:00
Rebecca Law
62cd234510
Merge pull request #663 from alphagov/fix-cancelled-jobs-migrations
...
Fix mis-matched database migrations
2016-09-06 13:18:27 +01:00
Chris Hill-Scott
1bf37888dd
Fix mis-matched database migrations
...
The cancelled job migration originally went in as version `0051`.
But `0051_set_job_status` went in first in
e3fa8bffd7
This meant that Alembic couldn’t work out what order to run the
migrations in, and blew up.
This commit puts the scheduled job migration after all others.
2016-09-06 13:07:20 +01:00
Chris Hill-Scott
9318eec3a5
Merge pull request #661 from alphagov/update-requirements-1
...
Update requirements
2016-09-06 12:12:52 +01:00
Chris Hill-Scott
be9fd96d03
Merge pull request #656 from alphagov/add-cancel-job-endpoint
...
Add an endpoint to cancel a job
2016-09-06 12:11:32 +01:00
Imdad Ahad
d6a8780515
Remove send notification test
2016-09-06 11:39:22 +01:00
Chris Hill-Scott
3b6905b98d
Update requirements
...
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/67
2016-09-06 10:53:34 +01:00
Imdad Ahad
d8a8a69aff
Update README to include additonal instructions
2016-09-06 10:30:57 +01:00
Rebecca Law
96a1d1a135
Update celery requirement
2016-09-05 17:00:16 +01:00
Rebecca Law
4d1c34fcce
A little bit of clean up.
...
- Remove the deploy to staging | live links in the README
- Update most of the outdated requirements. Left Flask update out for now.
2016-09-05 16:45:54 +01:00
Martyn Inglis
cf3ca764c5
Drop the status column
2016-09-05 16:16:32 +01:00
minglis
1d5db00b87
Merge pull request #657 from alphagov/drop-model-before-column
...
Changed 0052 to not drop the column, rather set it to allow nulls.
2016-09-05 14:46:46 +01:00
Martyn Inglis
22844d1bf2
Changed 0052 to not drop the column, rather set it to allow nulls.
...
This allows existing code to run.
2016-09-05 13:22:45 +01:00
minglis
64bb12c866
Merge pull request #640 from alphagov/scheduled-delivery-of-jobs-cleanup
...
Scheduled delivery of jobs cleanup
2016-09-05 12:29:10 +01:00
Leo Hemsted
6ceb80d32f
Merge pull request #651 from alphagov/contract-tests
...
Contract tests
2016-09-05 11:31:29 +01:00
Chris Hill-Scott
e28ce50d17
Don’t pass notify_db or notify_db_session to test
...
They get set up by the `sample_scheduled_job` fixture.
2016-09-03 08:48:03 +01:00
Chris Hill-Scott
2aa8baec63
Make indentation consistent
2016-09-02 23:22:15 +01:00
Chris Hill-Scott
2c17825c12
Don’t use magic string for job status
2016-09-02 23:22:14 +01:00
Chris Hill-Scott
5d4e942fa1
Use fixture for testing scheduled jobs
2016-09-02 12:27:23 +01:00
Chris Hill-Scott
11a4b18451
Combine query filters when getting scheduled job
...
> filter_by and filter are just aliases for each other so can be
> combined together - filter is probably the better one (and then use
> == instead of keyword args)
2016-09-02 12:27:23 +01:00
Chris Hill-Scott
4a7267be8b
Add an endpoint to cancel a job
...
If you schedule a job you might change your mind or circumstances might
change. So you need to be able to cancel it. This commit adds a `POST`
endpoint for individual jobs which sets their status to `cancelled`.
This also means adding a new status of `cancelled`, so there’s a
migration…
2016-09-02 12:27:02 +01:00
Rebecca Law
e3fa8bffd7
Fix merge conflicts in tests.
...
Update new migrations scripts to fix conflict in with script names.
2016-09-02 12:01:38 +01:00
Rebecca Law
8f3e8181fe
Merge branch 'master' into scheduled-delivery-of-jobs-cleanup
...
Conflicts:
tests/app/job/test_rest.py
2016-09-02 11:03:21 +01:00
Rebecca Law
aa8ee3a8da
Merge pull request #655 from alphagov/mmg-update-status
...
Update MMG status code 2 to be a permanent failure.
2016-09-02 09:44:24 +01:00
Leo Hemsted
b294568a91
Merge pull request #653 from alphagov/junit-test-results
...
add junit xml reporting to pytest
2016-09-02 09:38:01 +01:00
Rebecca Law
3d41fa9634
Update mmg status code 2 to be a permanent failure.
2016-09-01 10:23:37 +01:00
Leo Hemsted
95e3f39c6f
Merge pull request #632 from alphagov/readme-cleanup
...
cleaned up readme + environment file
2016-08-31 17:08:49 +01:00
minglis
f94e8d3cf0
Merge pull request #654 from alphagov/index-slow-queries
...
Indexes to improves stats for service query
2016-08-31 16:31:05 +01:00
minglis
c09fa34edf
Merge pull request #650 from alphagov/add-statistics-to-job
...
Return empty stats list for job creation
2016-08-31 16:25:25 +01:00
minglis
6405cb74c7
Merge pull request #649 from alphagov/queues-for-production
...
Queues for production
2016-08-31 16:25:13 +01:00
Martyn Inglis
ab5ff64dd0
Indexes to improves stats for service query
2016-08-31 16:24:18 +01:00
Leo Hemsted
00cac0f88b
add junit xml reporting to pytest
...
also add file location to gitignore preemptively
2016-08-31 15:03:28 +01:00