parameters: (self)
docstring: 回调函数: 线程启动前调用
docstring_summary: 回调函数: 线程启动前调用
docstring_tokens: 回调函数 : 线程启动前调用
function: def before_thread_start(self):
          ''' 回调函数: 线程启动前调用 '''
          # 初始化数据库连接
          self.db_session = SqlAlchemyPool().getConnection()
          # 获取新闻表的行数
          report_id_counter = common_db_func.query_table_count(
              self.db_session, mysql_config.TABLE_REPORT) + 1
          # 设置id的初始值
          self.id_generator.set_initial_counter(report_id_counter)
          pass
function_tokens: def before_thread_start ( self ) : # 初始化数据库连接 self . db_session = SqlAlchemyPool ( ) . getConnection ( ) # 获取新闻表的行数 report_id_counter = common_db_func . query_table_count ( self . db_session , mysql_config . TABLE_REPORT ) + 1 # 设置id的初始值 self . id_generator . set_initial_counter ( report_id_counter ) pass