#NEWLINE# def handle( self , * args , **options ) : #NEWLINE# #INDENT# ts = ( datetime . datetime . now ( ) - datetime . timedelta ( days = options . get ( 'days' , 30 ) ) ) #NEWLINE# base_kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if options . get ( 'logger' ) : #NEWLINE# #INDENT# base_kwargs [ 'logger' ] = args [ 'logger' ] #NEWLINE# #UNINDENT# ErrorBatch . objects . filter ( last_seen__lte = ts , ** base_kwargs ) . delete ( ) #NEWLINE# Error . objects . filter ( datetime__lte = ts , ** base_kwargs ) . delete ( )