def handle(self, *args, **options): sys.stdout.write("Cleaning up UDS\n") GlobalConfig.initialize() sys.stdout.write("Cache...\n") # UDSs cache Cache.cleanUp() # Django caches cache.clear() sys.stdout.write("Releasing schedulers...\n") # Release all Schedulers Scheduler.objects.all().update(owner_server='', state=State.FOR_EXECUTE) sys.stdout.write("UDS Cleaned UP\n")
def run(self): logger.debug('Starting cache cleanup') Cache.cleanUp() logger.debug('Done cache cleanup')