Commit f613c89b authored by Davide Lagoa's avatar Davide Lagoa
Browse files

new configuration fields

parent 9544d027
Pipeline #263 failed with stages
......@@ -13,4 +13,4 @@ port = 80
protocol = http://
#5 - restful worker starter
starter - /start
\ No newline at end of file
starter = /start
\ No newline at end of file
......@@ -59,17 +59,21 @@ def run():
mapping[workerID] = submissionID
port = configs.get('port')
processingPath = PROCESSING_PATH + submissionID
shutil.move(SUBMISSIONS_PATH + submissionID, processingPath)
processingPath = processingPath.replace('/', '$')
logging.info("Sending request to start to " + str(workerID))
logging.info(
"http://" + workerID + ":" + port + "/start/" + processingPath + "/" + RESULTS_PATH.replace('/',
'$') + submissionID)
requests.get("http://" + workerID + ":" + port + "/start/" + processingPath + "/" + RESULTS_PATH.replace('/',
'$') + submissionID) # request worker docker to run
protocol = configs.get('protocol')
starter = configs.get('starter')
processingPath = PROCESSING_PATH + submissionID
shutil.move(SUBMISSIONS_PATH + submissionID, processingPath)
processingPath = processingPath.replace('/', '$')
logging.info("Sending request to start to " + str(workerID))
logging.info("coiso -> " + protocol)
logging.info("coiso2 -> " + str(starter))
logging.info(
protocol + str(workerID) + ":" + str(port) + starter + "/" + processingPath + "/" + RESULTS_PATH.replace('/',
'$') + submissionID)
requests.get(
protocol + workerID + ":" + port + starter + "/" + processingPath + "/" + RESULTS_PATH.replace('/',
'$') + submissionID) # request worker docker to run
results = os.listdir(RESULTS_PATH)
processes = os.listdir(PROCESSING_PATH)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment