#NEWLINE# def recreate( DATABASE_URL ) : #NEWLINE# #INDENT# '\n    ' #NEWLINE# schema_filename = join ( dirname ( __file__ ) , 'schema.pgsql' ) #NEWLINE# with connect ( DATABASE_URL ) as conn : #NEWLINE# #INDENT# with conn . cursor ( ) as db : #NEWLINE# #INDENT# with open ( schema_filename ) as file : #NEWLINE# #INDENT# db . execute ( file . read ( ) ) #NEWLINE# #UNINDENT# db . execute ( 'DROP TABLE IF EXISTS queue' ) #NEWLINE# #UNINDENT# pq = PQ ( conn , table = 'queue' ) #NEWLINE# pq . create ( )