Skip to content

Commit

Permalink
Merge pull request #859 from alphagov/tmp-add-logging-for-report-down…
Browse files Browse the repository at this point in the history
…load-two

Add temporary logging where page size is above the config
  • Loading branch information
imdadahad committed Mar 14, 2017
2 parents 6d23dfd + f213e08 commit ac8e556
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/job/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@ def get_all_notifications_for_service_job(service_id, job_id):
filter_dict=data,
page=page,
page_size=page_size)

kwargs = request.args.to_dict()

if page_size > 50:
current_app.logger.info('Current page: {}'.format(page))
current_app.logger.info('Page size: {}'.format(page_size))
current_app.logger.info('Total pages in pagination: {}'.format(pagination.pages))
current_app.logger.info('Total notifications in pagination query: {}'.format(pagination.total))
current_app.logger.info('Arguments for next query: {}'.format(kwargs))

kwargs['service_id'] = service_id
kwargs['job_id'] = job_id
return jsonify(
Expand Down

0 comments on commit ac8e556

Please sign in to comment.