Skip to content
Snippets Groups Projects
Commit 191e4f88 authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Merge branch 'feature/26-update-endtime-when-workflow-is-canceled' into 'development'

Resolve "Update endtime when workflow is canceled"

Closes #26

See merge request !23
parents 1ad664e1 1bb66544
No related branches found
No related tags found
2 merge requests!69Delete dev branch,!23Resolve "Update endtime when workflow is canceled"
Pipeline #27746 passed
from uuid import UUID
from clowmdb.models import WorkflowExecution
from sqlalchemy import delete, or_, select, update
from sqlalchemy import delete, or_, select, text, update
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import joinedload
......@@ -146,7 +146,7 @@ class CRUDWorkflowExecution:
stmt = (
update(WorkflowExecution)
.where(WorkflowExecution._execution_id == eid)
.values(status=WorkflowExecution.WorkflowExecutionStatus.CANCELED.name)
.values(status=WorkflowExecution.WorkflowExecutionStatus.CANCELED.name, end_time=text("CURRENT_TIMESTAMP"))
)
await db.execute(stmt)
await db.commit()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment