def delete_uncompleted_calculations(db, user):
    """
    Delete the uncompleted calculations of the given user.

    :param db: a :class:`openquake.server.dbapi.Db` instance
    :param user: user name
    """
    db("UPDATE job SET status = 'deleted' WHERE user_name=?x AND status != 'complete'"
        , user)
