-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Split upload queue in two behind a new service #1470
base: master
Are you sure you want to change the base?
Conversation
3dcb3bf
to
c66db3b
Compare
c66db3b
to
955ad0e
Compare
05bd211
to
580f3ce
Compare
… previously on the common queue
…l an upload to the service instead of the queue
…atabase code to the service
…tabase work is done in the service instead
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a self assessment, marked all new To-dos that will be done in a sub PR
|
||
// TODO: Add to the correct queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
lazyCollection.filter("id IN %@", batchArray).freezeIfNeeded() | ||
} | ||
for file in matchedFrozenFiles { | ||
// TODO: Do it in this object and forward objects to specific queues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
} | ||
|
||
// Remove operation from tracking | ||
// TODO: Split two specific queues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
return | ||
} | ||
|
||
// TODO: Split two specific queues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
|
||
try? uploadsDatabase.writeTransaction { writableRealm in | ||
for uploadFileId in batch { | ||
// TODO: Split two specific queues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
continue | ||
} | ||
|
||
// TODO: Split two specific queues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
Log.uploadQueue("Done deleting all matching files for parentId:\(parentId)") | ||
} | ||
|
||
// TODO: Split between queues in sub PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
let frozenFileToDelete = toDeleteLive.freeze() | ||
frozenFileToDelete.cleanSourceFileIfNeeded() | ||
|
||
// TODO: Select correct upload queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
This PR/issue depends on:
|
Abstract
Strictly compatible refactor aiming at splitting the upload queues between
photoSync
and all other uploads.This PR is only the creation on an
UploadService
and the creation of two dedicated queues.Here, all uploads are still performed in the same queue.
This PR Draft enables the photo sync on a separate queue
Service:
UploadService
to centralise upload managementUploadService
encapsulate twouploadQueue
, one for photo sync and one globalUploadService
exclusively, not in the queueQueues:
UploadQueue
is focussed on queue related work, removed DB code.PhotoSyncUploadQueue
, subclassingUploadQueue
will be dedicated to photo upload is a sub PR.Dependencies
Depends on #1471