Exemple #1
0
                currApplication.serverName = serverName
                line = f.readline()
                instances = []
                while (line.startswith(applicationName + ".INSTANCE")):
                    instanceName = processLine(line)
                    line = f.readline()
                    urls = {}
                    while (line.startswith(applicationName + ".URL")):
                        urlName = processLine(line)
                        line = f.readline()
                        responses = []
                        while (line.startswith(applicationName + ".RESPONSE")):
                            response = processLine(line, 2, 2)
                            currCodeResponse = CodeResponse(
                                processLine(line, 2, 1), response)
                            line = f.readline()
                            responses.append(currCodeResponse)
                        urls[urlName] = responses
                    currInstance = Instance(instanceName, urls)
                    instances.append(currInstance)
                currApplication.instances = instances
                applications.append(currApplication)

#calls the read application function on the applications array
pool = ThreadPool(4)
pool.map(requestApplication, applications)
pool.close()
pool.join()

#outputs data to an HTML folder
dataToHTML()