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

Rework Raw Time Flow #311

Open
moveson opened this issue Apr 2, 2020 · 0 comments
Open

Rework Raw Time Flow #311

moveson opened this issue Apr 2, 2020 · 0 comments
Assignees
Labels
technical debt Upgrades and refactoring

Comments

@moveson
Copy link
Collaborator

moveson commented Apr 2, 2020

The code that takes incoming raw time records through the matching and validation process is pretty tangled. One source of the problem is that the original consumer of this code was the Live Entry screen, which handles raw times from within Raw Time Rows (RTRs). While convenient for keeping in and out times together in the Live Entry context, RTRs get in the way when we are trying to work with individual raw time records.

All consumers of this workflow come in through Api::V1::EventGroupsController. There are three sources of this flow:

  • Raw times imported and saved via the #import endpoint (as for OST Remote)
  • Groups of RTRs coming from Live Entry to the #submit endpoint (when clicking the Submit button)
  • Individual RTRs coming to the #enrich endpoint (throughout the Live Entry process)

The current flow looks like this:

IMG_2916

Proposed flow for an OST Remote-style import is as follows:

  1. Set parameterized split name and sortable/matchable bib numbers
  2. Save to database
  3. Kick off worker and send http response
    === From this point the worker takes over) ===
  4. Set absolute time and lap based on entered_time and entered_lap
  5. Match to existing split times
    === For unmatched raw times, continue processing ===
  6. Append efforts
  7. Group by effort, and for each group:
    7(a). Append new split times
    7(b). Set data status and split_time_exists
  8. Save updated raw times
  9. Save clean split times
  10. Send notifications
@moveson moveson added the technical debt Upgrades and refactoring label Mar 22, 2023
@moveson moveson self-assigned this Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Upgrades and refactoring
Projects
None yet
Development

No branches or pull requests

1 participant