Duplicate job in UI after canceling job
Describe the bug

To Reproduce Cancel job from UI
Expected behavior A clear and concise description of what you expected to happen.
Additional context Add any other context about the problem here.
This also appears to happen without cancelling a job. After a while, all jobs disappeared Kinda weird. More debugging: cancelling a completed job should not be possible, but the call to the cancel API returns
{
"cancelled": true
}
In the scheduler I get the following errors, so I guess there's more investigation needed.

The logic for the cancel_job API should be slightly different, probably it should check if a job can be cancelled. Only a running or queued job could be canceled.