From a40feee9c7446592942dc3aafdced02d27ddb3ab Mon Sep 17 00:00:00 2001
From: stvn <stvn@mit.edu>
Date: Wed, 13 Jan 2021 00:14:44 -0800
Subject: [PATCH] Increase logging verbosity on update_search_index task

to gain insight into CR-3119/TNL-7866.
We know that one or more errors are occuring during this job, but it's
not obvious what these errors are.
---
 cms/djangoapps/contentstore/tasks.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cms/djangoapps/contentstore/tasks.py b/cms/djangoapps/contentstore/tasks.py
index ecc883a636a..b7c09d734b3 100644
--- a/cms/djangoapps/contentstore/tasks.py
+++ b/cms/djangoapps/contentstore/tasks.py
@@ -190,7 +190,13 @@ def update_search_index(course_id, triggered_time_isoformat):
         CoursewareSearchIndexer.index(modulestore(), course_key, triggered_at=(_parse_time(triggered_time_isoformat)))
 
     except SearchIndexingError as exc:
-        LOGGER.error(u'Search indexing error for complete course %s - %s', course_id, text_type(exc))
+        error_list = exc.error_list
+        LOGGER.error(
+            u"Search indexing error for complete course %s - %s - %s",
+            course_id,
+            text_type(exc),
+            error_list,
+        )
     else:
         LOGGER.debug(u'Search indexing successful for complete course %s', course_id)
 
-- 
GitLab