def trimHistory():
 failed_db_con = db.DBConnection('failed.db')
 failed_db_con.action(('DELETE FROM history WHERE date < ' + str((datetime.datetime.today() - datetime.timedelta(days=30)).strftime(History.date_format))))

def trimHistory ( ) : failed_db_con = db . DBConnection ( 'failed.db' ) failed_db_con . action ( ( 'DELETE FROM history WHERE date < ' + str ( ( datetime . datetime . today ( ) - datetime . timedelta ( days = 30 ) ) . strftime ( History . date_format ) ) ) )
trims history table to 1 month of history from today .