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

Fix cancel task #70

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ coverage:
threshold: "10%"
ignore:
- "**/migrations/*.py"
- "django_project/core/settings/*.py"
7 changes: 2 additions & 5 deletions django_project/cplus_api/utils/worker_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,8 @@ def get_priority_layers(self):

def cancel_task(self, exception=None):
self.error = exception
# raise exception to stop the task
if exception:
raise exception
else:
raise Exception('Task is stopped with errors!')
# set the cancel flag to True
self.processing_cancelled = True

def log_message(self, message: str, name: str = "qgis_cplus",
info: bool = True, notify: bool = True):
Expand Down
2 changes: 1 addition & 1 deletion django_project/version/commit.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5239f6407c84d7925ead9b888451ebf8f098f9f9
48c4527942d09be6258c3d5e60994b274b291d4d
2 changes: 1 addition & 1 deletion django_project/version/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2
Loading