untitled-pit-group / foxhound

PIFS standard backend
BSD Zero Clause License
0 stars 0 forks source link

Uploading: finish #6

Closed paulsnar closed 2 years ago

paulsnar commented 2 years ago

Finishing an upload primarily entails checking with the GCS API that the file size matches the intent, allocating a file ID, noting it down, and enqueueing a job to do file processing/indexing. (The latter part is complex enough to warrant its own work item—actually two-and-a-half of them, given the vastly different workflows for text and media documents.)

If the file size doesn't match, the file should be deleted from GCS. In either case, the upload intent is deleted before this returns.

Depends on #4.

paulsnar commented 2 years ago

All parts apart from indexing are implemented in ff6ceae. That said, I don't think it's wise to close this until the indexing job is kicked off in UploadService at the proper time.

paulsnar commented 2 years ago

https://github.com/untitled-pit-group/foxhound/commit/e9be656ce6d86c9e25e4232a7c2ea008bc900a4b#diff-f02e92c9c12b0d6068e61725a514f3acf9a873de59278949930b42f02570c6e4R183-R186

close enough, right?