def __cleanUpExpiredSessions(self):
        try:
            #Recover expired sessions and delete them
            print Session.objects.filter(expire_date__lt=datetime.datetime.now())
            Session.objects.filter(expire_date__lt=datetime.datetime.now()).delete()
            transaction.commit_unless_managed()
        except Exception as e:
            print "Could not clean app db for expired sessions. Consider do it manually.\nException was: \n"+str(e)
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/ofeliasettings/openflow/foam/monitoring/SessionMonitoringThread.py/SessionMonitoringThread.__cleanUpExpiredSessions/original