#NEWLINE# @ classmethod #NEWLINE# def strategy_worker( cls , manager ) : #NEWLINE# #INDENT# b = cls ( manager ) #NEWLINE# settings = manager . settings #NEWLINE# drop_all_tables = settings . get ( 'SQLALCHEMYBACKEND_DROP_ALL_TABLES' ) #NEWLINE# clear_content = settings . get ( 'SQLALCHEMYBACKEND_CLEAR_CONTENT' ) #NEWLINE# model = b . models [ 'StateModel' ] #NEWLINE# if drop_all_tables : #NEWLINE# #INDENT# model . __table__ . drop ( bind = b . engine ) #NEWLINE# #UNINDENT# model . __table__ . create ( bind = b . engine ) #NEWLINE# if clear_content : #NEWLINE# #INDENT# session = b . session_cls ( ) #NEWLINE# session . execute ( model . __table__ . delete ( ) ) #NEWLINE# session . close ( ) #NEWLINE# #UNINDENT# b . _states = States ( b . session_cls , model , settings . get ( 'STATE_CACHE_SIZE_LIMIT' ) ) #NEWLINE# return model