File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,12 @@ export async function initializeServices(config: AppConfig): Promise<void> {
286286 // media uploads
287287 void PostProcess ( ) ;
288288
289- void initCourseDBDesignDocInsert ( ) ;
289+ initCourseDBDesignDocInsert ( ) . catch ( ( error ) => {
290+ logger . error ( `Error in initCourseDBDesignDocInsert background task: ${ error } ` ) ;
291+ if ( error && typeof error === 'object' ) {
292+ logger . error ( `Full error details in initCourseDBDesignDocInsert: ${ JSON . stringify ( error ) } ` ) ;
293+ }
294+ } ) ;
290295
291296 void useOrCreateDB ( 'classdb-lookup' ) ;
292297 try {
Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ function insertDesignDoc(
5151}
5252
5353export async function initCourseDBDesignDocInsert ( ) : Promise < void > {
54+ logger . info ( 'Starting initCourseDBDesignDocInsert...' ) ;
55+ logger . debug ( 'Attempting CourseLookup.allCourseWare() for design doc initialization' ) ;
5456 const courses = await CourseLookup . allCourseWare ( ) ;
57+ logger . info ( `Found ${ courses . length } courses for design doc initialization` ) ;
5558 courses . forEach ( ( c ) => {
5659 // Insert design docs
5760 courseDBDesignDocs . forEach ( ( dd ) => {
You can’t perform that action at this time.
0 commit comments