Retry-while-retrying is not an error in bulk email (#13068)

This code will be hit if, during a retry of the send_email task, an error
is encountered that means we need to retry the task again. Since the task will
be retried with timed backoff up to predefinied limits, this is an expected
situation and does not need to be logged as an exception.
This commit is contained in:
Eric Fischer
2016-07-22 14:19:03 -04:00
committed by GitHub
parent 056d27f8ca
commit 1af5e2abda

View File

@@ -795,8 +795,11 @@ def _submit_for_retry(entry_id, email_id, to_list, global_email_context,
raise retry_task
except RetryTaskError as retry_error:
# If the retry call is successful, update with the current progress:
log.exception(u'Task %s: email with id %d caused send_course_email task to retry.',
task_id, email_id)
log.info(
u'Task %s: email with id %d caused send_course_email task to retry again.',
task_id,
email_id
)
return subtask_status, retry_error
except Exception as retry_exc: # pylint: disable=broad-except
# If there are no more retries, because the maximum has been reached,