Skip to content

Commit b809a76

Browse files
committed
chore: fix pseudocode upload workflow
1 parent 4108b2e commit b809a76

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

mapillary_tools/uploader.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,19 @@ class InvalidMapillaryZipFileError(SequenceError):
156156
# BELOW demonstrates the pseudocode for a typical upload workflow
157157
# and when upload events are emitted
158158
#################################################################
159-
# def pseudo_upload(data):
159+
# def pseudo_upload(metadata):
160160
# emit("upload_start")
161161
# while True:
162162
# try:
163-
# if is_sequence(data):
164-
# for image in data:
165-
# upload_image(image)
163+
# if is_sequence(metadata):
164+
# for image in metadata:
165+
# upload_stream(image.read())
166166
# emit("upload_progress")
167-
# elif is_video(data):
168-
# for chunk in data:
169-
# upload_chunk(chunk)
167+
# elif is_video(metadata):
168+
# offset = fetch_offset()
169+
# emit("upload_fetch_offset")
170+
# for chunk in metadata.read()[offset:]:
171+
# upload_stream(chunk)
170172
# emit("upload_progress")
171173
# except BaseException as ex: # Include KeyboardInterrupt
172174
# if retryable(ex):

0 commit comments

Comments
 (0)