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

Add the from_time query parameter to the live tracking endpoints #2312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Dec 22, 2020

from_time allows specifying a start time as a UNIX timestamp for the endpoints:

  1. /live/<user_id>/json,
  2. /live/<users_id>,
  3. /tracking/latest.json

The endpoint /live/<user_id>/json already supports a latest_update query parameter which is the number of seconds since midnight of the day of the first point. If both from_time and latest_update are specified for this endpoint then the most recent condition wins (i.e. the conditions are ANDed).

Also specifying from_time does not allow retrieving earlier fixes than the maximum age for the endpoints (12h for #1 and #2 and 6h for #3).

Could you please review @Turbo87.

fixes #2277

/cc @indyflyersoft

@vicb
Copy link
Contributor Author

vicb commented Dec 22, 2020

Hum... I'm not sure what's wrong with black here.
I ran it on my code :(

Would be nice to have some more feedback in the logs.
I'll look into it later.

@vicb
Copy link
Contributor Author

vicb commented Dec 22, 2020

Other changes in this PR:

  • Add the --diff flag for black (lint test) so that error logs are actionable (different versions of black lead to different formatting),
  • Format the code with black (a few minor diffs),
  • Added a sanity check of the /live endpoint as the code has been updated to use TrackingFix.get_from_time() instead of the former TrackingFix.get_latest().

@vicb
Copy link
Contributor Author

vicb commented Jan 27, 2021

Hey @Turbo87 is there anything missing for this to be reviewed, merged and deployed ?

No rush but please let me know if more work is expected from me here.

Thanks !

@vicb
Copy link
Contributor Author

vicb commented Feb 13, 2021

ping ?

@Turbo87
Copy link
Member

Turbo87 commented Feb 18, 2021

No rush but please let me know if more work is expected from me here.

sorry, I'm missing time to do a proper review at the moment. lots of other stuff going on. 😞

@vicb
Copy link
Contributor Author

vicb commented May 17, 2024

Is anybody at skylines interested in merging this?
I could rebase if there is any interested.
Thanks

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

Successfully merging this pull request may close these issues.

[Feature] Support from_time for the /tracking/<user_ids> endpoint
2 participants