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

Multiple replies for the same request breaks requests handling #275

Open
giohappy opened this issue Oct 30, 2024 · 4 comments · May be fixed by #276
Open

Multiple replies for the same request breaks requests handling #275

giohappy opened this issue Oct 30, 2024 · 4 comments · May be fixed by #276
Assignees

Comments

@giohappy
Copy link
Contributor

We have noticed that sometimes QGIS (Qt) returns multiple replies for the same request, but only the first one contains valid content.
This was observed, for example, when the QGIS network cache is forcibly emptied (from the UI).

This behaviour doesn't depend on the plugin. It's also observed for other network providers (e.g. WMS) and without the GeoNode plugin loaded.

A workaround is to only parse the first reply for the same request, and disregard the next ones.

@Gpetrak
Copy link
Contributor

Gpetrak commented Nov 1, 2024

@giohappy we have to modify accordingly the LayerUploaderTask which is a subclass of network.NetworkRequestTask because during the layer upload, the plugin raises an error because of the following line: https://github.com/GeoNode/QGISGeoNodePlugin/blob/main/src/qgis_geonode/apiclient/geonode_v3.py#L639

@giohappy
Copy link
Contributor Author

giohappy commented Nov 1, 2024

@Gpetrak this could probably be refactored to avoid repeating the pattern?

From a quick look it seems most part of that method is the same as the base class.

@Gpetrak
Copy link
Contributor

Gpetrak commented Nov 1, 2024

@giohappy yes good point. We can include this refactoring in the issue related with the tasks consistency: #280
However, at the moment we could quickly fix it in order to include that fix to the PR of this issue.

@giohappy
Copy link
Contributor Author

giohappy commented Nov 1, 2024

yes, go ahead @Gpetrak

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 a pull request may close this issue.

2 participants