Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Pad not removed from backend workers after deletion #103

Copy link
Copy link
@cyclotruc

Description

@cyclotruc
Issue body actions

Image

When a pad is deleted by a user via the DELETE /pad_id request, there's no logic to remove it from running workers, leading to those warnings in logs upon periodic save

See pad_router.py

@pad_router.delete("/{pad_id}")
async def delete_pad(
    pad_access: Tuple[Pad, UserSession] = Depends(require_pad_owner),
    session: AsyncSession = Depends(get_session)
) -> Dict[str, Any]:
    """Delete a pad (owner only)"""
    try:
        pad, _ = pad_access
        success = await pad.delete(session)
        if not success:
            raise HTTPException(
                status_code=500,
                detail="Failed to delete pad"
            )
        
        return {"success": True, "message": "Pad deleted successfully"}
    except Exception as e:
        raise HTTPException(
            status_code=500,
            detail=f"Failed to delete pad: {str(e)}"
        )

Since the worker can be on another thread/instance of the fastAPI process when running multiple upstreams, we need to find a way to tell the canvas worker that it should stop handling the deleted pad through redis

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.