Skip to content

Need a way to rollback changes currently in the pending queue. #62

Open

Description

@crspybits

Suppose you do:

    do {
        // Make sure to enqueue both the image and discussion for upload without an intervening sync -- they are in the same file group, and this will enable other clients to download them together.
        
        try SyncServer.session.uploadImmutable(localFile: image.url!, withAttributes: imageAttr)
        
        // Using uploadCopy for discussions in case the discussion gets updated locally before we complete this sync operation. i.e., discussions are mutable.
        try SyncServer.session.uploadCopy(localFile: discussion.url!, withAttributes: discussionAttr)

        try SyncServer.session.sync(sharingGroupUUID: image.sharingGroupUUID!)
    } catch (let error) {
        Log.error("An error occurred: \(error)")
    }

But only the first upload works. It would be useful to roll back the other.

Activity

  1. crspybits commented on Nov 23, 2018

    @crspybits
    OwnerAuthor

    This is currently needed in line 161 of the SharedImages SyncController.swift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions