Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log job call values #91

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
13 changes: 11 additions & 2 deletions spalloc_client/protocol_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@
from collections import deque
import errno
import json
import logging
import socket

from threading import current_thread, RLock, local, Thread
from types import TracebackType
from typing import Any, cast, Dict, List, Literal, Optional, Type, Union
from threading import current_thread, RLock, local, Thread

from typing import Dict, List, Optional
from typing_extensions import Self

from spinn_utilities.log import FormatAdapter
from spinn_utilities.typing.json import (
JsonObject, JsonObjectArray, JsonValue)

from spalloc_client._utils import time_left, timed_out, make_timeout

logger = FormatAdapter(logging.getLogger(__name__))


class ProtocolError(Exception):
""" Thrown when a network-level problem occurs during protocol handling.
Expand Down Expand Up @@ -396,6 +401,10 @@ def create_job(self, timeout: Optional[float], *args: int,
if owner is None:
raise SpallocServerException(
"owner must be specified for all jobs.")
msg = (f"create_job {args=} {owner=} {keepalive=} {machine=} {tags} "
f"{min_ratio=} {max_dead_boards=} {max_dead_links=} "
f"{require_torus=}")
logger.info(msg)
if tags is not None and machine is not None:
raise SpallocServerException(
f"Unexpected {tags=} and {machine=} are both not None")
Expand Down
Loading