Skip to content
Snippets Groups Projects
Commit 74c57018 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: add utf endcoding and comment away scheduler

parent 5cdd206c
No related branches found
No related tags found
1 merge request!16Clhp map into main
...@@ -150,7 +150,7 @@ if __name__ == "__main__": ...@@ -150,7 +150,7 @@ if __name__ == "__main__":
print("Server running on port ", PORT) print("Server running on port ", PORT)
# Initialise the scheduler for updating lakes # Initialise the scheduler for updating lakes
update_scheduler() # update_scheduler() NB temporarily removed for production
# Run server indefinitely # Run server indefinitely
server.serve_forever() server.serve_forever()
......
This diff is collapsed.
...@@ -16,8 +16,8 @@ def update_scheduler(): ...@@ -16,8 +16,8 @@ def update_scheduler():
"""Schedules the updating of all maps every three days""" """Schedules the updating of all maps every three days"""
print("Updating all lake data. This may take some time...") print("Updating all lake data. This may take some time...")
# Parse all lake names to a list # Parse all lake names to a list. Set encoding to utf-8 to retain scandinavian characters
with open(LAKE_RELATIONS_PATH + 'all_lake_names.json', 'r') as file: with open(LAKE_RELATIONS_PATH + 'all_lake_names.json', 'r', encoding='utf-8') as file:
lake_names = json.load(file) lake_names = json.load(file)
# Run update_all_measurements on startup # Run update_all_measurements on startup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment