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

Convert executeKart to a QgsTask #80

Open
pfw opened this issue Oct 28, 2022 · 1 comment
Open

Convert executeKart to a QgsTask #80

pfw opened this issue Oct 28, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pfw
Copy link
Contributor

pfw commented Oct 28, 2022

Is your feature request related to a problem? Please describe.
executeKart currently uses subprocess.Popen directly and doesn't run in seperate threads. This has a couple of issues around the UI locking up on long operations and difficulty in correctly reporting progress without causing other race conditions.

Describe the solution you'd like
Move executeKart from using subprocess.Popen directly to using that within a QgsTask

@pfw pfw added the enhancement New feature or request label Oct 28, 2022
@pfw pfw self-assigned this Oct 28, 2022
@pfw
Copy link
Contributor Author

pfw commented Oct 28, 2022

Docs for how to implement a QqsTask https://docs.qgis.org/3.22/en/docs/pyqgis_developer_cookbook/tasks.html

executeKart is often called as one of many steps in a process and so we need a way for code to call a task, wait for the response, call another task etc. Or any block of code that calls kart should itself be entirely within a QgsTask so that the UI doesn't block waiting for a response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant