Skip to content

Commit 808a5e9

Browse files
committed
add comment
1 parent a9595a6 commit 808a5e9

File tree

1 file changed

+6
-0
lines changed
  • mapswipe_workers/mapswipe_workers/project_types/base

1 file changed

+6
-0
lines changed

mapswipe_workers/mapswipe_workers/project_types/base/project.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,17 @@ def save_to_firebase(self, project, groups, groupsOfTasks):
218218
tasks_list = groupsOfTasks[group_id]
219219
c += 1
220220
if self.projectType in [ProjectType.FOOTPRINT.value]:
221+
# for tasks of a building footprint project
222+
# we use compression to reduce storage size in firebase
223+
# since the tasks hold geometries their storage size
224+
# can get quite big otherwise
221225
compressed_tasks = gzip_str.compress_tasks(tasks_list)
222226
task_upload_dict[
223227
f"v2/tasks/{self.projectId}/{group_id}"
224228
] = compressed_tasks
225229
else:
230+
# for all other projects (build_area, completenesss, change detection)
231+
# we just upload the tasks without compression
226232
task_upload_dict[f"v2/tasks/{self.projectId}/{group_id}"] = tasks_list
227233

228234
# we upload tasks in batches of maximum 150 groups

0 commit comments

Comments
 (0)