diff --git a/.gitignore b/.gitignore index 5ceb386..7f93ebf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ venv +__pycache__ diff --git a/Dockerfile b/Dockerfile index 3862e9d..27f89e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,4 +45,4 @@ CMD [ "run", "-h", "0.0.0.0"] # TODO: in docker 25 and later, we should use --start-interval and # --start-period to perform more frequent checks on startup to speed # up tests -HEALTHCHECK --interval=10s CMD curl --fail http://localhost:5000 || exit 1 +HEALTHCHECK --interval=600s --timeout=30s --start-period=60s --start-interval=5s --retries=3 CMD curl --fail http://localhost:5000 || exit 1 diff --git a/application.py b/application.py index 968470e..dfd3a52 100644 --- a/application.py +++ b/application.py @@ -70,7 +70,7 @@ def get_people(): transformed_data = {} for persondata in data: transformed_data[persondata["name"]] = { - "interests": [skill["controlledName"] for skill in persondata["skills"]] + "interests": [skill["name"] for skill in persondata["skills"]] } return transformed_data diff --git a/capxmock/capxmock.json b/capxmock/capxmock.json index e88ffc0..abc07ed 100644 --- a/capxmock/capxmock.json +++ b/capxmock/capxmock.json @@ -6,27 +6,12 @@ "response": { "body": [{"name": "Person A", - "skills": [{"controlledName": "Skill 1", - "hasValidWikiLink": 2, - "name": "Skill 1", - "rareness": 2, - "rarenessCount": 7, - "skillTagId": 1, - "tasksNeedingThisSkill": null}, - {"controlledName": "Skill 2", - "hasValidWikiLink": 2, - "name": "Skill 2", - "rareness": 2, - "rarenessCount": 7, - "skillTagId": 1, - "tasksNeedingThisSkill": null}]}, + "skills": [{"name": "Skill 1", + "skillTagId": 1}, + {"name": "Skill 2", + "skillTagId": 1}]}, {"name": "Person B", - "skills": [{"controlledName": "Skill 3", - "hasValidWikiLink": 2, - "name": "Skill 3", - "rareness": 2, - "rarenessCount": 7, - "skillTagId": 1, - "tasksNeedingThisSkill": null}]}] + "skills": [{"name": "Skill 3", + "skillTagId": 1}]}] } }