Skip to content
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
5 changes: 5 additions & 0 deletions servicex_app/servicex_app/lookup_result_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def celery_task_name(request_id):
def add_files_to_processing_queue(self, request, files=None):
if files is None:
files = request.all_files
if request.status.is_complete:
current_app.logger.debug("Rejecting file addition request, request is canceled",
extra={
"task_id": self.celery_task_name(request.request_id)})
return
for file_record in files:
self.celery.send_task("transformer_sidecar.transform_file",
kwargs={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get(self, request_id: str):

namespace = current_app.config['TRANSFORMER_NAMESPACE']

if transform_req.status == TransformStatus.running:
if transform_req.status in (TransformStatus.running, TransformStatus.lookup):
try:
self.transformer_manager.shutdown_transformer_job(request_id, namespace)
except kubernetes.client.exceptions.ApiException as exc:
Expand Down
2 changes: 1 addition & 1 deletion servicex_app/servicex_app/templates/requests_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</td>
<td id="replicas-{{ req.request_id }}">-</td>
<td>
{% if req.status.string_name == 'Running' %}
{% if not req.status.is_complete %}
<button id="cancel-{{ req.request_id }}"
onclick="fetch('/servicex/transformation/{{ req.request_id }}/cancel').then((res) => location.reload())"
type="button" class="btn btn-danger btn-sm">
Expand Down