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

FYST-397 ensure that waiting to load data always proceeds correctly #5615

Conversation

anisharamnani
Copy link
Contributor

Link to pivotal/JIRA issue

https://codeforamerica.atlassian.net/browse/FYST-397

Is PM acceptance required? (delete one)

  • No - merge after code review approval

Reminder: merge main into this branch and get green tests before merging to main

What was done?

This is plagiarism from Mike's original description:

Calls stream_for intake before broadcast_job_complete(intake). broadcast_to(intake, ...) is called by broadcast_job_complete(intake), but won’t do anything until stream_for is called. This should marginally speed up the data transfer page

How to test?

We've written some tests. They are as good as they can get & don't actually test the problem. But, the action cable testing documentation is very limited.

Copy link

Heroku app: https://gyr-review-app-5615-e3b7a981d4f8.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5615 (optionally add --tail)

@anisharamnani anisharamnani marked this pull request as ready for review February 20, 2025 23:06
Copy link
Contributor

@arinchoi03 arinchoi03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but would love some explanation/discussion soon about why we call broadcast_job_complete twice (once from within the subscribed method and once from within the ImportFromDirectFileJob and whether we need both.

@anisharamnani
Copy link
Contributor Author

@arinchoi03 I believe this is to check if the client already has direct_file_data & doesn't need to wait for the job to run. as opposed to runninng the entire job.

@anisharamnani anisharamnani merged commit 9c12df9 into main Feb 20, 2025
7 checks passed
@anisharamnani anisharamnani deleted the FYST-397-ensure-that-waiting-to-load-data-always-proceeds-correctly branch February 20, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants