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

Performance improvement for form responses #1474

Merged
merged 11 commits into from
Jul 17, 2024
Merged

Performance improvement for form responses #1474

merged 11 commits into from
Jul 17, 2024

Conversation

ryanwoldatwork
Copy link
Collaborator

No description provided.

sanason and others added 2 commits July 12, 2024 14:46
* Improve loading performance of 'Responses by status' table
* Use S3 to store results of async export jobs
@@ -33,31 +33,5 @@
<%= paginate @events %>

<p>
<%= link_to "Export Events to CSV", admin_export_events_url(format: "csv"), class: "usa-button export-btn", target: "_blank", rel: "noopener" %>
<%= link_to "Export Events to CSV", admin_export_events_url, class: "usa-button", target: "_blank", rel: "noopener" %>
Copy link
Member

Choose a reason for hiding this comment

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

I know it's pre-existing behavior but it's kind of weird that this opens in a new tab when none of the other exports do.

csv_content = Version.to_csv(versionable)
ActionCable.server.broadcast(
Copy link
Member

Choose a reason for hiding this comment

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

When I run this locally, this job fails with error:

ArgumentError: wrong number of arguments (given 1, expected 2)

app/jobs/export_job.rb Outdated Show resolved Hide resolved
@@ -16,6 +18,17 @@ def notification(title: '', body: '', path: '', emails: [])
to: emails
end

def async_report_notification(email:, start_time:, completion_time:, record_count:, url:)
Copy link
Member

Choose a reason for hiding this comment

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

Ryan, you mentioned making some readability improvements to the email. If you're doing that, I think it would be useful to include the name of the exported file in the email body and/or subject, unless there's some security reason not to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point. i've noted this in Trello and we can follow up with feature

app/helpers/s3_helper.rb Outdated Show resolved Hide resolved
ryanwoldatwork and others added 3 commits July 16, 2024 15:13
* update filename and job options
* clear form tag filter
* update seeds

* return all websites

* ensure s3 helper has a timestamp as well

* update record_count
* remove opener from export events
* indicate export buttons with an icon
@ryanwoldatwork ryanwoldatwork merged commit 9c86e3f into main Jul 17, 2024
5 checks passed
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.

None yet

2 participants