Skip to content
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

Draft
wants to merge 62 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
4652da5
feat(UploadService): New service in DI to centralise upload
adrien-coye Mar 10, 2025
ac8feae
feat: Two upload queues availlable from DI
adrien-coye Mar 10, 2025
955ad0e
feat(UploadService): Sample implementation
adrien-coye Mar 10, 2025
1ecafd4
refactor(UploadCardViewModel): Use new upload service
adrien-coye Mar 10, 2025
2ab2462
refactor(UploadService): Protocol split away from base class
adrien-coye Mar 10, 2025
c58d434
feat(UploadService): Database accessor methods
adrien-coye Mar 11, 2025
807489a
feat(UploadService): Notifications
adrien-coye Mar 11, 2025
2be00a5
feat(UploadService): Observation
adrien-coye Mar 11, 2025
1736088
feat(UploadService): Publish
adrien-coye Mar 11, 2025
31b6057
feat(UploadService): Specific protocol for DB access
adrien-coye Mar 11, 2025
5c33e51
refactor(UploadCardViewModel): Now using uploadService
adrien-coye Mar 11, 2025
9a82cc3
refactor(UploadQueueFoldersViewController): Now using uploadService
adrien-coye Mar 11, 2025
43458b9
refactor(UploadQueueViewController): Now using uploadService
adrien-coye Mar 11, 2025
779497a
refactor(PhotoSyncSettingsViewController): Now using uploadService
adrien-coye Mar 11, 2025
0d1b746
refactor(UploadTableViewCell): Now using uploadService
adrien-coye Mar 11, 2025
c59344f
refactor(UploadCountManager): Now using uploadService
adrien-coye Mar 11, 2025
8866bfe
refactor(AppDelegate): Now using uploadService
adrien-coye Mar 11, 2025
aa69a24
refactor(AppRouter): Now using uploadService
adrien-coye Mar 11, 2025
3f1f2c5
refactor(FreeSpaceService): Now using uploadService
adrien-coye Mar 11, 2025
5c147bf
refactor(DirectoryEnumerator): Now using uploadService
adrien-coye Mar 11, 2025
d3ffe48
refactor(BackgroundTasksService): Now using uploadService
adrien-coye Mar 11, 2025
57cb260
refactor(UploadFileProviderItem): Now using uploadService
adrien-coye Mar 11, 2025
d6c8026
refactor(PhotoLibraryUploader): Removed dead code
adrien-coye Mar 11, 2025
b73d0eb
refactor(UploadOperation): Now using uploadService
adrien-coye Mar 11, 2025
5813871
refactor(SceneDelegate): Now using uploadService
adrien-coye Mar 11, 2025
42997c5
refactor(FileProviderExtension): Now using uploadService
adrien-coye Mar 11, 2025
5ce6aa1
refactor(MainTabViewController): Now using uploadService
adrien-coye Mar 11, 2025
ac27b0a
refactor(SceneDelegate): Now using uploadService
adrien-coye Mar 11, 2025
7fee39f
refactor(AppDelegateBGNSURLSession): Now using uploadService
adrien-coye Mar 11, 2025
2b82a5c
refactor(BackgroundUploadSessionManager): Removed dead code
adrien-coye Mar 11, 2025
00614ca
refactor(PhotoLibraryCleanerService): Now using uploadService
adrien-coye Mar 11, 2025
9008404
refactor(FileImportHelper): Now using uploadService
adrien-coye Mar 11, 2025
580f3ce
refactor(UploadService): Removed now dead code
adrien-coye Mar 11, 2025
80b654a
refactor(UploadQueue): Remove dead code and start all operations like…
adrien-coye Mar 12, 2025
2539f1e
refactor(UploadService): Restart uploads from service init instead of…
adrien-coye Mar 12, 2025
6f58088
refactor(UploadQueue): Relocated code to the service
adrien-coye Mar 12, 2025
1297662
refactor(UploadQueue): Moved some code to the service
adrien-coye Mar 12, 2025
924741d
refactor(UploadService): Moved the database transaction part of cance…
adrien-coye Mar 12, 2025
05601f9
refactor(UploadQueue): Reworked cancelAllOperations function moving d…
adrien-coye Mar 12, 2025
7c18ad6
fix(UploadService): Correct suspended logic
adrien-coye Mar 12, 2025
4db3b93
chore: Reorganize upload related files
adrien-coye Mar 12, 2025
5272216
refactor(UploadQueue): Reworked retryAllOperations function so the da…
adrien-coye Mar 12, 2025
eec784c
refactor(UploadQueue): Restart logic moved to UploadService
adrien-coye Mar 12, 2025
aadefd3
refactor(UploadQueue): Retry logic moved to UploadService
adrien-coye Mar 12, 2025
d153c55
refactor(UploadQueue): Remove dead code
adrien-coye Mar 12, 2025
9bb872a
refactor(UploadQueue): Remove dead code
adrien-coye Mar 12, 2025
ba2c63a
refactor(UploadService): Remove dead code
adrien-coye Mar 12, 2025
c95dfb0
chore(UploadService): Added a todo
adrien-coye Mar 12, 2025
b5121ce
chore(UploadOperation): Sonar asked to remove explicit self
adrien-coye Mar 12, 2025
22ff4ad
refactor(UploadQueueObservable): Renamed UploadObservable
adrien-coye Mar 13, 2025
a39077f
refactor(ITAppLaunchTest): Now using uploadService
adrien-coye Mar 13, 2025
d11f946
refactor(UTRootViewControllerState): Now using uploadService
adrien-coye Mar 13, 2025
a48d115
chore: Remove TODOs related to splitting the photoSync upload queue
adrien-coye Mar 13, 2025
6bb1d53
chore(BackgroundUploadSessionManager): SwiftLint extra blank space
adrien-coye Mar 13, 2025
c1b7d69
refactor(UploadQueueFoldersViewController): Missing private in property
adrien-coye Mar 13, 2025
ad125dd
refactor(UploadServiceDataSourceable): Removed comments in protocol t…
adrien-coye Mar 13, 2025
7d62ec5
refactor(UploadNotifiable): Removed comments in protocol to match con…
adrien-coye Mar 13, 2025
8718cfe
refactor(UploadObservable): Removed comments in protocol to match con…
adrien-coye Mar 13, 2025
582e7b0
refactor(UploadServiceable): Removed comments in protocol to match co…
adrien-coye Mar 13, 2025
e75031a
refactor(UploadQueueable): Removed comments in protocol to match conv…
adrien-coye Mar 13, 2025
fafa7d7
refactor(BackgroundUploadSessionManager): Removed comments in protoco…
adrien-coye Mar 13, 2025
0266deb
chore(UploadService): Linter complained extra return statement
adrien-coye Mar 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kDrive/AppDelegate+BGNSURLSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension AppDelegate {
Log.bgSessionManager("background session relaunched identifier:\(identifier)")
if identifier == DownloadQueue.backgroundIdentifier {
backgroundDownloadSessionManager.backgroundCompletionHandler = completionHandler
} else if identifier.hasSuffix(UploadQueue.backgroundBaseIdentifier) {
} else if identifier.hasSuffix(UploadServiceBackgroundIdentifier.base) {
backgroundUploadSessionManager.handleEventsForBackgroundURLSession(identifier: identifier,
completionHandler: completionHandler)
} else {
Expand Down
8 changes: 4 additions & 4 deletions kDrive/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
downloadQueue.suspendAllOperations()
downloadQueue.cancelAllOperations()

@InjectService var uploadQueue: UploadQueueable
uploadQueue.suspendAllOperations()
uploadQueue.rescheduleRunningOperations()
@InjectService var uploadService: UploadServiceable
uploadService.suspendAllOperations()
uploadService.rescheduleRunningOperations()

// Await on upload queue to terminate gracefully, if time allows for it.
let group = TolerantDispatchGroup()
uploadQueue.waitForCompletion {
uploadService.waitForCompletion {
// Clean temp files once the upload queue is stoped if needed
@LazyInjectService var freeSpaceService: FreeSpaceService
freeSpaceService.auditCache()
Expand Down
4 changes: 2 additions & 2 deletions kDrive/AppRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ public struct AppRouter: AppNavigable {
photoUploader.scheduleNewPicturesForUpload()

// Resolving an upload queue will restart it if this is the first time
@InjectService var uploadQueue: UploadQueue
uploadQueue.rebuildUploadQueueFromObjectsInRealm()
@InjectService var uploadService: UploadServiceable
uploadService.rebuildUploadQueueFromObjectsInRealm()
}

// MARK: RouterFileNavigable
Expand Down
11 changes: 6 additions & 5 deletions kDrive/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate, AccountManagerDel
@LazyInjectService var appNavigable: AppNavigable
@LazyInjectService var appRestorationService: AppRestorationServiceable
@LazyInjectService var deeplinkParser: DeeplinkParsable
@LazyInjectService var uploadNotifications: UploadNotifiable
@LazyInjectService var uploadDataSource: UploadServiceDataSourceable
@LazyInjectService var uploadObservation: UploadObservable

var shortcutItemToProcess: UIApplicationShortcutItem?

Expand Down Expand Up @@ -116,8 +119,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate, AccountManagerDel

func sceneWillEnterForeground(_ scene: UIScene) {
Log.sceneDelegate("sceneWillEnterForeground \(scene) \(window)")
@InjectService var uploadQueue: UploadQueue
uploadQueue.pausedNotificationSent = false
uploadNotifications.setPausedNotificationSent(false)

let currentState = RootViewControllerState.getCurrentState()
let session = scene.session
Expand Down Expand Up @@ -335,9 +337,8 @@ extension SceneDelegate {
shouldRemoveAfterUpload: false)
group.enter()
shouldCleanFolder = true
@InjectService var uploadQueue: UploadQueue
var observationToken: ObservationToken?
observationToken = uploadQueue
observationToken = uploadObservation
.observeFileUploaded(self, fileId: uploadFile.id) { [fileId = file.id] uploadFile, _ in
observationToken?.cancel()
if let error = uploadFile.error {
Expand All @@ -354,7 +355,7 @@ extension SceneDelegate {
}
group.leave()
}
uploadQueue.saveToRealm(uploadFile, itemIdentifier: nil)
uploadDataSource.saveToRealm(uploadFile, itemIdentifier: nil, addToQueue: true)
}
}

Expand Down
14 changes: 7 additions & 7 deletions kDrive/UI/Controller/Files/File List/UploadCardViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UploadCardViewModel {
@Published var uploadCount: Int

@LazyInjectService var accountManager: AccountManageable
@LazyInjectService var uploadQueue: UploadQueue
@LazyInjectService var uploadDataSource: UploadServiceDataSourceable

var driveFileManager: DriveFileManager {
didSet {
Expand All @@ -46,12 +46,12 @@ class UploadCardViewModel {

private func initObservation() {
let driveId = driveFileManager.driveId
uploadCount = uploadQueue.getUploadingFiles(withParent: uploadDirectory.id,
userId: accountManager.currentUserId,
driveId: driveId).count
realmObservationToken = uploadQueue.getUploadingFiles(withParent: uploadDirectory.id,
userId: accountManager.currentUserId,
driveId: driveId).observe(on: .main) { [weak self] change in
uploadCount = uploadDataSource.getUploadingFiles(withParent: uploadDirectory.id,
userId: accountManager.currentUserId,
driveId: driveId).count
realmObservationToken = uploadDataSource.getUploadingFiles(withParent: uploadDirectory.id,
userId: accountManager.currentUserId,
driveId: driveId).observe(on: .main) { [weak self] change in
switch change {
case .initial(let results):
self?.uploadCount = results.count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typealias FileDisplayed = CornerCellContainer<File>
final class UploadQueueFoldersViewController: UITableViewController {
@LazyInjectService private var accountManager: AccountManageable
@LazyInjectService private var driveInfosManager: DriveInfosManager
@LazyInjectService private var uploadQueue: UploadQueue
@LazyInjectService private var uploadDataSource: UploadServiceDataSourceable

private var frozenUploadingFolders = [FileDisplayed]()
private var notificationToken: NotificationToken?
Expand Down Expand Up @@ -62,7 +62,7 @@ final class UploadQueueFoldersViewController: UITableViewController {
guard driveFileManager != nil else { return }
let driveIds = [driveFileManager.driveId] + driveInfosManager.getDrives(for: userId, sharedWithMe: true)
.map(\.id)
let uploadingFiles = uploadQueue.getUploadingFiles(userId: userId, driveIds: driveIds)
let uploadingFiles = uploadDataSource.getUploadingFiles(userId: userId, driveIds: driveIds)
.distinct(by: [\.parentDirectoryId])

notificationToken = uploadingFiles.observe(keyPaths: UploadFile.observedProperties, on: .main) { [weak self] change in
Expand Down
21 changes: 11 additions & 10 deletions kDrive/UI/Controller/Files/Upload/UploadQueueViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ final class UploadQueueViewController: UIViewController {
@IBOutlet var cancelButton: UIBarButtonItem!

@LazyInjectService var accountManager: AccountManageable
@LazyInjectService var uploadQueue: UploadQueue
@LazyInjectService var uploadService: UploadServiceable
@LazyInjectService var uploadDataSource: UploadServiceDataSourceable

var currentDirectory: File!
private var frozenUploadingFiles = [UploadFileDisplayed]()
Expand Down Expand Up @@ -74,9 +75,9 @@ final class UploadQueueViewController: UIViewController {

notificationToken?.invalidate()

let observedFiles = AnyRealmCollection(uploadQueue.getUploadingFiles(withParent: currentDirectory.id,
userId: accountManager.currentUserId,
driveId: currentDirectory.driveId))
let observedFiles = AnyRealmCollection(uploadDataSource.getUploadingFiles(withParent: currentDirectory.id,
userId: accountManager.currentUserId,
driveId: currentDirectory.driveId))
notificationToken = observedFiles.observe(keyPaths: UploadFile.observedProperties, on: .main) { [weak self] change in
guard let self else {
return
Expand Down Expand Up @@ -122,15 +123,15 @@ final class UploadQueueViewController: UIViewController {
}

@IBAction func cancelButtonPressed(_ sender: UIBarButtonItem) {
uploadQueue.cancelAllOperations(withParent: currentDirectory.id,
userId: accountManager.currentUserId,
driveId: currentDirectory.driveId)
uploadService.cancelAllOperations(withParent: currentDirectory.id,
userId: accountManager.currentUserId,
driveId: currentDirectory.driveId)
}

@IBAction func retryButtonPressed(_ sender: UIBarButtonItem) {
uploadQueue.retryAllOperations(withParent: currentDirectory.id,
userId: accountManager.currentUserId,
driveId: currentDirectory.driveId)
uploadService.retryAllOperations(withParent: currentDirectory.id,
userId: accountManager.currentUserId,
driveId: currentDirectory.driveId)
}

static func instantiate() -> UploadQueueViewController {
Expand Down
20 changes: 11 additions & 9 deletions kDrive/UI/Controller/MainTabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class MainTabViewController: UITabBarController, Restorable, PlusButtonObserver
var photoPickerDelegate = PhotoPickerDelegate()

@LazyInjectService var accountManager: AccountManageable
@LazyInjectService var uploadQueue: UploadQueue
@LazyInjectService var uploadDataSource: UploadServiceDataSourceable
@LazyInjectService var fileImportHelper: FileImportHelper
@LazyInjectService var router: AppNavigable

Expand Down Expand Up @@ -385,15 +385,17 @@ extension MainTabViewController: UIDocumentPickerDelegate {
}

try FileManager.default.moveItem(at: url, to: targetURL)
uploadQueue.saveToRealm(
UploadFile(
parentDirectoryId: documentPicker.importDriveDirectory.id,
userId: accountManager.currentUserId,
driveId: documentPicker.importDriveDirectory.driveId,
url: targetURL,
name: url.lastPathComponent
)
let newFile = UploadFile(
parentDirectoryId: documentPicker.importDriveDirectory.id,
userId: accountManager.currentUserId,
driveId: documentPicker.importDriveDirectory.driveId,
url: targetURL,
name: url.lastPathComponent
)

uploadDataSource.saveToRealm(newFile,
itemIdentifier: nil,
addToQueue: true)
} catch {
UIConstants.showSnackBarIfNeeded(error: DriveError.unknownError)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ extension PhotoSyncSettingsViewController: FooterButtonDelegate {
DispatchQueue.global(qos: .userInitiated).async {
// Add new pictures to be uploaded and reload upload queue
self.photoLibraryUploader.scheduleNewPicturesForUpload()
@InjectService var uploadQueue: UploadQueue
uploadQueue.rebuildUploadQueueFromObjectsInRealm()
@InjectService var uploadService: UploadServiceable
uploadService.rebuildUploadQueueFromObjectsInRealm()
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions kDrive/UI/View/Files/Upload/UploadTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class UploadTableViewCell: InsetTableViewCell {
private var thumbnailRequest: UploadFile.ThumbnailRequest?
private var progressObservation: NotificationToken?
@LazyInjectService(customTypeIdentifier: kDriveDBID.uploads) private var uploadsDatabase: Transactionable
@LazyInjectService var uploadQueue: UploadQueue
@LazyInjectService var uploadService: UploadServiceable

override func awakeFromNib() {
super.awakeFromNib()
Expand Down Expand Up @@ -157,15 +157,15 @@ final class UploadTableViewCell: InsetTableViewCell {
return
}

self.uploadQueue.cancel(uploadFile: file)
self.uploadService.cancel(uploadFileId: file.id)
}
cardContentView.retryButtonPressedHandler = { [weak self] in
guard let self, !uploadFile.isInvalidated else {
return
}

cardContentView.retryButton?.isHidden = true
uploadQueue.retry(uploadFileId)
uploadService.retry(uploadFileId)
}
}

Expand Down
6 changes: 3 additions & 3 deletions kDrive/Utils/UploadCountManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import kDriveCore
import RealmSwift

final class UploadCountManager {
@LazyInjectService var uploadQueue: UploadQueue
@LazyInjectService var uploadDataSource: UploadServiceDataSourceable
@LazyInjectService var driveInfosManager: DriveInfosManager

private let driveFileManager: DriveFileManager
Expand Down Expand Up @@ -65,14 +65,14 @@ final class UploadCountManager {

@discardableResult
func updateUploadCount() -> Int {
uploadCount = uploadQueue.getUploadingFiles(userId: userId, driveIds: driveIds).count
uploadCount = uploadDataSource.getUploadingFiles(userId: userId, driveIds: driveIds).count
return uploadCount
}

private func observeUploads() {
guard uploadsObserver == nil else { return }

uploadsObserver = uploadQueue
uploadsObserver = uploadDataSource
.getUploadingFiles(userId: userId, driveIds: driveIds)
.observe(on: observeQueue) { [weak self] change in
guard let self else {
Expand Down
40 changes: 31 additions & 9 deletions kDriveCore/DI/FactoryService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private let loginConfig = InfomaniakLogin.Config(clientId: "9473D73C-C20F-4971-9
/// Something that setups the service factories
public enum FactoryService {
public static func setupDependencyInjection(other: [Factory] = []) {
let factoriesWithIdentifier = debugServices + transactionableServices
let factoriesWithIdentifier = debugServices + transactionableServices + uploadQueues
SimpleResolver.register(factoriesWithIdentifier)
let factories = networkingServices + miscServices + other
SimpleResolver.register(factories)
Expand Down Expand Up @@ -97,23 +97,29 @@ public enum FactoryService {
Factory(type: DownloadQueueable.self) { _, _ in
DownloadQueue()
},
Factory(type: UploadQueue.self) { _, _ in
UploadQueue()
Factory(type: UploadServiceable.self) { _, _ in
UploadService()
},
Factory(type: UploadQueueable.self) { _, resolver in
try resolver.resolve(type: UploadQueue.self,
Factory(type: UploadServiceDataSourceable.self) { _, resolver in
try resolver.resolve(type: UploadServiceable.self,
forCustomTypeIdentifier: nil,
factoryParameters: nil,
resolver: resolver)
},
Factory(type: UploadQueueObservable.self) { _, resolver in
try resolver.resolve(type: UploadQueue.self,
Factory(type: UploadNotifiable.self) { _, resolver in
try resolver.resolve(type: UploadServiceable.self,
forCustomTypeIdentifier: nil,
factoryParameters: nil,
resolver: resolver)
},
Factory(type: UploadNotifiable.self) { _, resolver in
try resolver.resolve(type: UploadQueue.self,
Factory(type: UploadObservable.self) { _, resolver in
try resolver.resolve(type: UploadServiceable.self,
forCustomTypeIdentifier: nil,
factoryParameters: nil,
resolver: resolver)
},
Factory(type: UploadPublishable.self) { _, resolver in
try resolver.resolve(type: UploadServiceable.self,
forCustomTypeIdentifier: nil,
factoryParameters: nil,
resolver: resolver)
Expand Down Expand Up @@ -224,6 +230,22 @@ public enum FactoryService {

return services
}

static var uploadQueues: [FactoryWithIdentifier] {
let globalUploadQueue = Factory(type: UploadQueueable.self) { _, _ in
UploadQueue()
}

let photoUploadQueue = Factory(type: UploadQueueable.self) { _, _ in
PhotoUploadQueue()
}

let services = [
(globalUploadQueue, UploadQueueID.global),
(photoUploadQueue, UploadQueueID.photo)
]
return services
}
}

public extension SimpleResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,12 @@ public typealias RequestCompletionHandler = (Data?, URLResponse?, Error?) -> Voi
public typealias BackgroundCompletionHandler = () -> Void

protocol BackgroundUploadSessionManageable: URLSessionTaskDelegate, URLSessionDelegate, URLSessionDataDelegate {
/// Returns the background session
var backgroundSession: URLSession! { get }

/// Recreate the URLSessions from existing identifiers in base, and set this instance as delegate.
func reconnectBackgroundTasks()

func scheduled(task: URLSessionDataTask?, fileUrl: URL?)

/// Cancel a running request, reschedule it on the background session, and returns a dedicated identifier
/// - Parameters:
/// - task: The task to reschedule
/// - fileUrl: The url of the file to upload
/// - Returns: a dedicated request identifier, or nil if failed
func rescheduleForBackground(task: URLSessionDataTask, fileUrl: URL) -> String?
}

Expand Down Expand Up @@ -69,8 +62,6 @@ extension URLSession: Identifiable {
public final class BackgroundUploadSessionManager: NSObject,
BackgroundUploadSessionManageable,
BackgroundUploadSessionCompletionable {
@LazyInjectService var uploadQueue: UploadQueue

private var backgroundCompletionHandlers: [String: BackgroundCompletionHandler] = [:]

var backgroundSession: URLSession!
Expand All @@ -97,7 +88,7 @@ public final class BackgroundUploadSessionManager: NSObject,
Log.bgSessionManager("init")
super.init()

backgroundSession = getSessionOrCreate(for: UploadQueue.backgroundIdentifier)
backgroundSession = getSessionOrCreate(for: UploadServiceBackgroundIdentifier.app)
}

public func getSessionOrCreate(for identifier: String) -> URLSession {
Expand Down
Loading
Loading