Skip to content

Cancel jobs when a user is deleted #148

@abought

Description

@abought

Summary

Currently, if a user deletes their account while a job is in the queue, it will continue running even though there may be no way to deliver results. (since they can't log in to get download links)

This is wasteful in times of peak load. We've recently started warning users with multiple accounts, and have seen some examples of people deleting accounts while jobs are running.

Proposed change

The user deletion code currently sets jobs to the user "public" but does not check if jobs are running.

It makes sense to keep some record of jobs for tracking purposes, but ideally, the jobs should be canceled if running (before being changed)

A much longer term solution would be to pair this with "soft deletion", where the user record in the DB was retained, with a new field is_deleted = true that blocks login etc. This would allow auditing of user behavior that is not possible when the entire row is completely removed from the DB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions