Merge branch 'master' into update-job-status

Conflicts:
	app/dao/jobs_dao.py
	tests/app/dao/test_jobs_dao.py
This commit is contained in:
Rebecca Law
2017-04-06 11:11:37 +01:00
12 changed files with 170 additions and 38 deletions

View File

@@ -55,7 +55,8 @@ def make_request(notification_type, provider, data, headers):
"POST",
api_call,
headers=headers,
data=data
data=data,
timeout=60
)
response.raise_for_status()
except RequestException as e:

View File

@@ -10,7 +10,7 @@ from app.aws import s3
from app import notify_celery
from app import performance_platform_client
from app.dao.invited_user_dao import delete_invitations_created_more_than_two_days_ago
from app.dao.jobs_dao import dao_set_scheduled_jobs_to_pending, dao_get_jobs_older_than
from app.dao.jobs_dao import dao_set_scheduled_jobs_to_pending, dao_get_jobs_older_than_limited_by
from app.dao.notifications_dao import (
delete_notifications_created_more_than_a_week_ago,
dao_timeout_notifications,
@@ -28,7 +28,7 @@ from app.celery.tasks import process_job
@notify_celery.task(name="remove_csv_files")
@statsd(namespace="tasks")
def remove_csv_files():
jobs = dao_get_jobs_older_than(7)
jobs = dao_get_jobs_older_than_limited_by()
for job in jobs:
s3.remove_job_from_s3(job.service_id, job.id)
current_app.logger.info("Job ID {} has been removed from s3.".format(job.id))