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

Create a composable and update task polling #13093

Open
marcellamaki opened this issue Feb 18, 2025 — with Slack · 2 comments
Open

Create a composable and update task polling #13093

marcellamaki opened this issue Feb 18, 2025 — with Slack · 2 comments

Comments

Copy link
Member

Create a composable in kolibri-common for doing task polling.

It should use a similar pattern that Blaine has implemented elsewhere, where it includes a mounted counter, so it gets torn down when all mounted instances have been destroyed that were using it, but otherwise reuses the same polling.

If multiple components consuming it, it shouldn't be initialized multiple times.

This should use useTimeoutPoll from vueuse (or equivalent). This will mean - we don't setup multiple setIntervals, and we only ever poll again when the previous poll has finished.

The only caveat here might be if we are polling tasks with different queues, we should make sure to uniqueify these polls.

Then, replace any instances of setInterval for task polling wiht this

@marcellamaki marcellamaki added this to the Kolibri 0.18: General maintenance milestone Feb 18, 2025 — with Slack
@yadavshubham01
Copy link

Hey @marcellamaki, I'm new here and would love to give this issue a try. Let me know if I can take it!

@AlexVelezLl
Copy link
Member

Hey @yadavshubham01! Thanks for your interest in contributing to Learning Equality! Unfortunately, this issue is not open for Open Source contribution, please take a look at the issues labeled as help wanted 🤗.

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

No branches or pull requests

3 participants