Parcel calculation to background #55
Labels
No Label
backlog
bug
duplicate
enhancement
feature
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
in discussion
invalid
priority
1
priority
2
priority
3
priority
4
priority
5
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: IT-Naturschutz/konova#55
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Status quo
Parcels are updated each time the geometry could have been changed. For larger geometries, where a few hundred parcels could be relevant, this update process takes more time due to the net traffic limitations of the used WFS. This slows done the whole HTTP response, since we need to wait for the update to finish. Users could be confused or get angry if the webapp does not respond in <1s.
Improvement
Move the parcel calculation into a background process. This way the HTTP response can be done, even with a still running parcel update.
Of course this leads to a side effect.
Old parcels still visible
In a case of 1000+ parcels the update might take up a few seconds and even longer. The update start the moment, a user hits the
Save
button on the form, where geometry is being processed. Since the update would be finished in a background process, the HTTP response could be delivered immediately to the user, which will be redirected on the detail view to see all of the changes, made to the data. But the parcels could still be the old ones!Solution
Parcel calculation ongoing. Please refresh this page in a while...
to inform the user about what is going on right now and they should return later.Celery
Introduces celery to the project. Using celery, we are now able to process certain tasks in the background.
Frontend now
After saving changes to the dataset, the user will be redirected to the detail view as usual. The parcels are cleared directly, so none will be visible anymore. However, an info text will appear:
When the parcel calculation has been completed, the detail view will be able to list them again:
Merged in #58