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

fix: gdpr export polling #10158

Merged
merged 1 commit into from
Dec 13, 2023
Merged

fix: gdpr export polling #10158

merged 1 commit into from
Dec 13, 2023

Conversation

JammingBen
Copy link
Contributor

Description

Fixes periodically checking for new gdpr exports which didn't work reliably due to never resetting the polling interval.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Dec 13, 2023
@@ -52,7 +52,7 @@ export default defineComponent({
const { downloadFile } = useDownloadFile()

const loading = ref(true)
const checkInterval = ref()
const checkInterval = ref<NodeJS.Timer>()
Copy link
Member

Choose a reason for hiding this comment

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

eeks, this type looks fishy to be honest.

window.setInterval should return a number and so should setInterval if TypeScript is properly setup.. let me check, if I can quickly fix it

Copy link
Member

Choose a reason for hiding this comment

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

Okay, this is annoying and I can't be bothered to fix it right now... two suggestions:
Either

  1. Use window.setInterval which always has number as return type and use ref<number>() here
    or
  2. Use ref<ReturnType<typeof setInterval>>() here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for checking! Decided to go with the second approach here

Fixes periodically checking for new gdpr exports which didn't work reliably due to never resetting the polling interval.
@JammingBen JammingBen force-pushed the fix-gdpr-export-polling branch from 3578b99 to a3d9ee7 Compare December 13, 2023 13:20
@JammingBen JammingBen requested a review from dschmidt December 13, 2023 13:20
Copy link

@JammingBen JammingBen merged commit 3519e04 into master Dec 13, 2023
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix-gdpr-export-polling branch December 13, 2023 14:11
@micbar micbar mentioned this pull request Dec 27, 2023
71 tasks
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.

To create a new GDPR report, the user needs to reload the page
3 participants