import json

def clearRedis(redisServer):


    pathList=[]
    
    moduleList=['module131', 'module132', 'module133', 'module231', 'module232', 'module233', 'module322', 'module331', 'module332', 'module333', 'module341', 'module342', 'module343', 'module422', 'module431', 'module432', 'module433', 'module441', 'module442', 'module443', 'module521', 'module522', 'module523', 'module531', 'module532', 'module533', 'module541', 'module542', 'module543', 'module621', 'module622', 'module623', 'module631', 'module632', 'module633', 'module641', 'module642', 'module643']
    for name in moduleList:
        path = '/GPPD/workspace/MantidData/'+name+'/xy_image/x'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/xy_image/y'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/xy_image/value'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/d'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/intensity'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/tof'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/counts'
        pathList.append(path)

    monitorList=['monitor1', 'monitor2', 'monitor3']
    for name in monitorList:
        path = '/GPPD/workspace/MantidData/'+name+'/tof'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/counts'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/wave'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/intensity'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/xy_image/x'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/xy_image/y'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/xy_image/value'
        pathList.append(path)
         
    
    groupList = ['group01','group02','group03']
    for name in groupList:
        path = '/GPPD/workspace/MantidData/'+name+'/raw/d'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/raw/intensity'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/raw/tof'
        pathList.append(path)
        path = '/GPPD/workspace/MantidData/'+name+'/raw/counts'
        pathList.append(path)

    for i in range(len(pathList)):
        redisServer.set(pathList[i], json.dumps('clear'))
	
