Upgrade leaves the old jobs in the database

After the upgrade the interrupted jobs are still shown in the web ui and the server uses quite a bit cpu. All goes back to normal once the jobs are removed by their expiration time or user actions.