ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

Publisher Worker Queue: Disconnect Success #557

Open AndyTWF opened 1 year ago

AndyTWF commented 1 year ago

Implement the following worker from AAT Android:

This worker provides all the functionality of removing a trackable from all the places that it is stored, after detaching from the channel has been completed elsewhere. It also removes any subscriber data related to the trackable. It also updates resolutions and other stateflows related to trackables. If the trackable is the last trackable, then location updates are stopped. If the trackable is the active one, then the active trackable is cleared (and resolution policy informed). Once all of this is done, TrackableRemovalSuccess work is posted with a success result.

This worker disconnects the ably connection asynchronously if the trackable is the only trackable present, and calls StoppingConnectionFinished when this is the case.

If the asynchronous work fails and we are trying to disconnect, StoppingConnectionFinished work is posted.

If the synchronous work fails, TrackableRemovalSuccess work is posted with a failure result.

This work depends on:

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3370