Commit fa1c2875 authored by jcapela's avatar jcapela
Browse files

[FIX] submissions check

parent 23e6ebba
Pipeline #2818 passed with stage
in 5 minutes and 52 seconds
......@@ -3,6 +3,7 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/transyt-manager-docker.iml" filepath="$PROJECT_DIR$/.idea/transyt-manager-docker.iml" />
<module fileurl="file://$PROJECT_DIR$/../transyt-workers-docker/.idea/transyt-workers-docker.iml" filepath="$PROJECT_DIR$/../transyt-workers-docker/.idea/transyt-workers-docker.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="Flask">
<option name="enabled" value="true" />
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.6 (untitled1)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/templates" />
</list>
</option>
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (untitled1)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TransytLatestVersion.iml" filepath="$PROJECT_DIR$/.idea/TransytLatestVersion.iml" />
</modules>
</component>
</project>
\ No newline at end of file
......@@ -65,12 +65,13 @@ def run():
if len(submissions) > 0:
submissionID = getNextInQueue(submissions)
logger.info("Next in queue = " + submissionID)
workerID = findAvailableWorker(mapping)
if submissionID is not None:
logger.info("Next in queue = " + submissionID)
workerID = findAvailableWorker(mapping)
logger.info("Available workerID = " + str(workerID))
logger.info("Available workerID = " + str(workerID))
if workerID is not None:
if workerID is not None and submissionID is not None:
mapping[workerID] = submissionID
starter = CONFIGURATIONS.get('starter')
......@@ -97,12 +98,7 @@ def run():
logger.error("An error occurred while starting the worker!")
mapping = checkSubmissionsStatus(mapping)
# results = os.listdir(RESULTS_PATH)
# for key in mapping.keys(): # reset workers that finished
# if mapping[key] in results:
# shutil.rmtree(RESULTS_PATH + mapping[key], ignore_errors=True)
# mapping[key] = None
results = os.listdir(RESULTS_PATH)
cleanResultsDirectory()
......
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