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

Publisher Worker Queue: DestinationSet #567

Open
AndyTWF opened this issue Feb 17, 2023 · 1 comment
Open

Publisher Worker Queue: DestinationSet #567

AndyTWF opened this issue Feb 17, 2023 · 1 comment
Milestone

Comments

@AndyTWF
Copy link
Contributor

AndyTWF commented Feb 17, 2023

Implement the following worker from android:

  • DestinationSet
  • (and the publisher method: setDestination)

This worker sets the publisher's estimated arrival time based on the current time + the expected route duration.

This work is posted by the publisher when the destination is set (setDestination in android's publisher). We kind of have that method in Swift, but it's a bit spread out, so it may be worth a refactor.

The setDestination method on the publisher:

  • Takes two arguments: the destination and the publisher properties.
  • If there is no current publisher location set on the publisher, add a raw location command (see Publisher Worker Queue: Raw Location Updates #542) to be executed when a raw location is received that sets the destination.
  • Otherwise, remove the current destination of the publisher and set it to the destination provided to the method. Mapbox is then instructed to set a route to that destination and, on success DestinationSet work is posted.

This method is called by the following workers:

  • ChangeRoutingProfile
  • SetActiveTrackable

When looking into this, we should also investigate how to “set a route” on mapbox, as this is something we’re doing in Android but don’t appear to be doing in iOS. We’re adding some extra buffer to our estimations to account for this.

@sync-by-unito
Copy link

sync-by-unito bot commented Feb 17, 2023

➤ Automation for Jira commented:

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

@AndyTWF AndyTWF changed the title Worker Queue: Set Destination Publisher Worker Queue: Set Destination Feb 23, 2023
@sync-by-unito sync-by-unito bot changed the title Publisher Worker Queue: Set Destination Publisher Worker Queue: DestinationSet Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant