func (w *worker) Update(ctx context.Context, assignments []*api.AssignmentChange) error {
    w.mu.Lock()
    defer w.mu.Unlock()

    if w.closed {