mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 08:01:25 +00:00
fix: fix cancel job for flows in some edge cases
This commit is contained in:
@@ -140,7 +140,11 @@ pub async fn cancel_job<'c: 'async_recursion>(
|
||||
return Ok((tx, None));
|
||||
}
|
||||
let job_running = job_running.unwrap();
|
||||
if job_running.running && !force_cancel {
|
||||
if job_running.running
|
||||
&& job_running.job_kind != JobKind::Flow
|
||||
&& job_running.job_kind != JobKind::FlowPreview
|
||||
&& !force_cancel
|
||||
{
|
||||
sqlx::query!(
|
||||
"UPDATE queue SET canceled = true, canceled_by = $1, canceled_reason = $2, scheduled_for = now(), suspend = 0 WHERE id = $3 \
|
||||
AND workspace_id = $4 ",
|
||||
|
||||
@@ -492,7 +492,7 @@
|
||||
target="_blank"
|
||||
href="/run/{node.job_id ?? ''}?workspace={job?.workspace_id}"
|
||||
>
|
||||
{truncateRev(node.job_id ?? '', 1) ?? ''}
|
||||
{truncateRev(node.job_id ?? '', 10) ?? ''}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user