Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG2900
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Savanovic Djordjevic
PROG2900
Commits
74c57018
Commit
74c57018
authored
1 year ago
by
Sara Savanovic Djordjevic
Browse files
Options
Downloads
Patches
Plain Diff
update: add utf endcoding and comment away scheduler
parent
5cdd206c
No related branches found
Branches containing commit
No related tags found
1 merge request
!16
Clhp map into main
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
server/main.py
+1
-1
1 addition, 1 deletion
server/main.py
server/map_handler/lake_relations/skumsjøen_measurements.json
+0
-0
0 additions, 0 deletions
...er/map_handler/lake_relations/skumsjøen_measurements.json
server/scheduler.py
+2
-2
2 additions, 2 deletions
server/scheduler.py
with
3 additions
and
3 deletions
server/main.py
+
1
−
1
View file @
74c57018
...
@@ -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.
Click to expand it.
server/map_handler/lake_relations/skumsjøen_measurements.json
deleted
100644 → 0
+
0
−
0
View file @
5cdd206c
This diff is collapsed.
Click to expand it.
server/scheduler.py
+
2
−
2
View file @
74c57018
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment