예제 #1
0
    def after_sis_data_refresh(cls, term_id):
        distinct_instructor_uids = SisSection.get_distinct_instructor_uids()
        insert_or_update_instructors(distinct_instructor_uids)
        app.logger.info(f'{len(distinct_instructor_uids)} instructors updated')

        refresh_rooms()
        app.logger.info('RDS indexes updated.')

        refresh_cross_listings(term_id=term_id)
        app.logger.info('Cross-listings updated.')
예제 #2
0
    def run(self, args=None):
        resolved_ddl_rds = resolve_sql_template(
            'update_rds_sis_sections.template.sql')
        if execute(resolved_ddl_rds):
            distinct_instructor_uids = SisSection.get_distinct_instructor_uids(
            )
            insert_or_update_instructors(distinct_instructor_uids)
            app.logger.info(
                f'{len(distinct_instructor_uids)} instructors updated')

            term_id = app.config['CURRENT_TERM_ID']
            CrossListing.refresh(term_id=term_id)
            app.logger.info('\'cross_listings\' table refreshed')

            refresh_rooms()
            app.logger.info('RDS indexes updated.')
        else:
            raise BackgroundJobError(
                'Failed to update RDS indexes for intermediate schema.')
예제 #3
0
def _load_supplemental_course_data(term_id):
    distinct_instructor_uids = SisSection.get_distinct_instructor_uids()
    insert_or_update_instructors(distinct_instructor_uids)
    CrossListing.refresh(term_id=term_id)
    refresh_rooms()
    std_commit(allow_test_environment=True)