Skip to content

Conversation

@rtibbles
Copy link
Member

Summary

  • Use useTimeoutPoll instead of useIntervalFn to wait for completion before repolling.
  • Return promise to defer, increase interval to reduce server load.

References

Fixes #13412

Reviewer guidance

I reduced this in scope to more directly address the issue, as I think using the task polling composable more generally would require a very large refactor of the Vuex state.

To test this, I added a time.sleep to the tasks/api.py list method, and these updates ensured that while the request was still pending a new request was not initiated.

@github-actions github-actions bot added APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend SIZE: very small labels Jun 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2025

@marcellamaki marcellamaki self-assigned this Jun 24, 2025
@marcellamaki marcellamaki self-requested a review June 24, 2025 14:09
@rtibbles rtibbles changed the base branch from develop to release-v0.18.x July 11, 2025 17:16
…fore repolling.

Return promise to defer, increase interval to reduce server load.
@rtibbles rtibbles force-pushed the poll_poll_poll_your_tasks_gently_with_backoff branch from d3372ae to 141f532 Compare July 11, 2025 17:18
Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

The changes here make sense in terms of reducing the frequency of polling. Manual QA confirms that task polling for content is still happening, it's happening at the 5s interval, and the experience from the user perspective for the content import work flow tasks is fine with the less frequent status updates

@rtibbles rtibbles merged commit 21556e7 into learningequality:release-v0.18.x Jul 11, 2025
51 checks passed
@rtibbles rtibbles deleted the poll_poll_poll_your_tasks_gently_with_backoff branch July 11, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend SIZE: very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tweak content queue polling in the device page

2 participants