Unions claim victory for keeping canning factory open