-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
Labels
bugSomething isn't workingSomething isn't working