cap-sdk-python 2.13.1__tar.gz → 2.13.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/PKG-INFO +1 -1
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/handshake.py +5 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/heartbeat.py +20 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/handshake_pb2.py +6 -6
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/heartbeat_pb2.py +4 -4
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap_sdk_python.egg-info/PKG-INFO +1 -1
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/pyproject.toml +1 -1
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_handshake.py +23 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_heartbeat.py +28 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/README.md +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/__init__.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/bus.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/client.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/constants.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/errors.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/metrics.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/middleware.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/__init__.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/__init__.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/__init__.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/__init__.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/alert_pb2.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/alert_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/buspacket_pb2.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/buspacket_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/handshake_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/heartbeat_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/job_pb2.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/job_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/policy_pb2.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/policy_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/safety_pb2.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/safety_pb2_grpc.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/progress.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/runtime.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/subjects.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/testing.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/validate.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/worker.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap_sdk_python.egg-info/SOURCES.txt +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap_sdk_python.egg-info/dependency_links.txt +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap_sdk_python.egg-info/requires.txt +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap_sdk_python.egg-info/top_level.txt +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/setup.cfg +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_conformance.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_errors.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_metrics.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_middleware.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_progress.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_redis_tls.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_runtime.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_sdk.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_testing.py +0 -0
- {cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/tests/test_validate.py +0 -0
|
@@ -10,6 +10,7 @@ from cryptography.hazmat.primitives.asymmetric import ec
|
|
|
10
10
|
from google.protobuf import timestamp_pb2
|
|
11
11
|
|
|
12
12
|
from cap.constants import DEFAULT_PROTOCOL_VERSION
|
|
13
|
+
from cap.heartbeat import sanitize_agent_name
|
|
13
14
|
from cap.pb.cordum.agent.v1 import buspacket_pb2, handshake_pb2
|
|
14
15
|
from cap.subjects import SUBJECT_HANDSHAKE
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@ def handshake_payload(
|
|
|
21
22
|
sender_id: Optional[str] = None,
|
|
22
23
|
supported_versions: Optional[Sequence[int]] = None,
|
|
23
24
|
ready_topics: Optional[Sequence[str]] = None,
|
|
25
|
+
agent_name: str = "",
|
|
24
26
|
) -> bytes:
|
|
25
27
|
"""Build a worker handshake payload."""
|
|
26
28
|
ts = timestamp_pb2.Timestamp()
|
|
@@ -37,6 +39,7 @@ def handshake_payload(
|
|
|
37
39
|
supported_versions=list(supported_versions or [DEFAULT_PROTOCOL_VERSION]),
|
|
38
40
|
capabilities=dict(capabilities or {}),
|
|
39
41
|
ready_topics=list(ready_topics or []),
|
|
42
|
+
agent_name=sanitize_agent_name(agent_name),
|
|
40
43
|
)
|
|
41
44
|
)
|
|
42
45
|
return packet.SerializeToString(deterministic=True)
|
|
@@ -51,6 +54,7 @@ async def publish_handshake(
|
|
|
51
54
|
sender_id: Optional[str] = None,
|
|
52
55
|
supported_versions: Optional[Sequence[int]] = None,
|
|
53
56
|
ready_topics: Optional[Sequence[str]] = None,
|
|
57
|
+
agent_name: str = "",
|
|
54
58
|
) -> None:
|
|
55
59
|
"""Publish one worker handshake packet to the CAP handshake subject."""
|
|
56
60
|
payload = handshake_payload(
|
|
@@ -59,6 +63,7 @@ async def publish_handshake(
|
|
|
59
63
|
sender_id=sender_id,
|
|
60
64
|
supported_versions=supported_versions,
|
|
61
65
|
ready_topics=ready_topics,
|
|
66
|
+
agent_name=agent_name,
|
|
62
67
|
)
|
|
63
68
|
data = payload
|
|
64
69
|
if private_key is not None:
|
|
@@ -18,6 +18,20 @@ from cap.subjects import SUBJECT_HEARTBEAT
|
|
|
18
18
|
|
|
19
19
|
_logger = logging.getLogger("cap.heartbeat")
|
|
20
20
|
|
|
21
|
+
#: Maximum length (in characters) of a human-facing agent display label.
|
|
22
|
+
AGENT_NAME_MAX_LEN = 128
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def sanitize_agent_name(name: str) -> str:
|
|
26
|
+
"""Trim, collapse internal whitespace, and bound a human-facing agent
|
|
27
|
+
display label for safe transport on ``Heartbeat``/``Handshake``.
|
|
28
|
+
|
|
29
|
+
The result is a DISPLAY label only: consumers MUST prefer authenticated
|
|
30
|
+
identity records over this self-reported value and MUST NOT treat it as
|
|
31
|
+
proof of identity.
|
|
32
|
+
"""
|
|
33
|
+
return " ".join(name.split())[:AGENT_NAME_MAX_LEN]
|
|
34
|
+
|
|
21
35
|
|
|
22
36
|
def heartbeat_payload(
|
|
23
37
|
worker_id: str,
|
|
@@ -26,6 +40,7 @@ def heartbeat_payload(
|
|
|
26
40
|
max_parallel: int,
|
|
27
41
|
cpu_load: float,
|
|
28
42
|
auth_token: str = "",
|
|
43
|
+
agent_name: str = "",
|
|
29
44
|
) -> bytes:
|
|
30
45
|
"""Build a heartbeat payload with CPU utilization only."""
|
|
31
46
|
return heartbeat_payload_with_progress(
|
|
@@ -35,6 +50,7 @@ def heartbeat_payload(
|
|
|
35
50
|
max_parallel=max_parallel,
|
|
36
51
|
cpu_load=cpu_load,
|
|
37
52
|
auth_token=auth_token,
|
|
53
|
+
agent_name=agent_name,
|
|
38
54
|
)
|
|
39
55
|
|
|
40
56
|
|
|
@@ -46,6 +62,7 @@ def heartbeat_payload_with_memory(
|
|
|
46
62
|
cpu_load: float,
|
|
47
63
|
memory_load: float,
|
|
48
64
|
auth_token: str = "",
|
|
65
|
+
agent_name: str = "",
|
|
49
66
|
) -> bytes:
|
|
50
67
|
"""Build a heartbeat payload including memory utilization."""
|
|
51
68
|
return heartbeat_payload_with_progress(
|
|
@@ -56,6 +73,7 @@ def heartbeat_payload_with_memory(
|
|
|
56
73
|
cpu_load=cpu_load,
|
|
57
74
|
memory_load=memory_load,
|
|
58
75
|
auth_token=auth_token,
|
|
76
|
+
agent_name=agent_name,
|
|
59
77
|
)
|
|
60
78
|
|
|
61
79
|
|
|
@@ -69,6 +87,7 @@ def heartbeat_payload_with_progress(
|
|
|
69
87
|
progress_pct: int = 0,
|
|
70
88
|
last_memo: str = "",
|
|
71
89
|
auth_token: str = "",
|
|
90
|
+
agent_name: str = "",
|
|
72
91
|
) -> bytes:
|
|
73
92
|
"""Build a heartbeat payload including optional progress fields."""
|
|
74
93
|
ts = timestamp_pb2.Timestamp()
|
|
@@ -90,6 +109,7 @@ def heartbeat_payload_with_progress(
|
|
|
90
109
|
progress_pct=progress_pct,
|
|
91
110
|
last_memo=last_memo,
|
|
92
111
|
auth_token=auth_token,
|
|
112
|
+
agent_name=sanitize_agent_name(agent_name),
|
|
93
113
|
)
|
|
94
114
|
)
|
|
95
115
|
return packet.SerializeToString(deterministic=True)
|
|
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63ordum/agent/v1/handshake.proto\x12\x0f\x63ordum.agent.v1\"\
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63ordum/agent/v1/handshake.proto\x12\x0f\x63ordum.agent.v1\"\xa3\x02\n\tHandshake\x12\x14\n\x0c\x63omponent_id\x18\x01 \x01(\t\x12,\n\x04role\x18\x02 \x01(\x0e\x32\x1e.cordum.agent.v1.ComponentRole\x12\x1a\n\x12supported_versions\x18\x03 \x03(\x05\x12\x42\n\x0c\x63\x61pabilities\x18\x04 \x03(\x0b\x32,.cordum.agent.v1.Handshake.CapabilitiesEntry\x12\x13\n\x0bsdk_version\x18\x05 \x01(\t\x12\x14\n\x0cready_topics\x18\x06 \x03(\t\x12\x12\n\nagent_name\x18\x07 \x01(\t\x1a\x33\n\x11\x43\x61pabilitiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01*\xc4\x01\n\rComponentRole\x12\x1e\n\x1a\x43OMPONENT_ROLE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x43OMPONENT_ROLE_GATEWAY\x10\x01\x12\x1c\n\x18\x43OMPONENT_ROLE_SCHEDULER\x10\x02\x12\x19\n\x15\x43OMPONENT_ROLE_WORKER\x10\x03\x12\x1f\n\x1b\x43OMPONENT_ROLE_ORCHESTRATOR\x10\x04\x12\x1d\n\x19\x43OMPONENT_ROLE_CONTROLLER\x10\x05\x42\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -34,10 +34,10 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
34
34
|
_globals['DESCRIPTOR']._serialized_options = b'\n\026io.cordum.cap.agent.v1P\001Z+github.com/cordum-io/cap/v2/cordum/agent/v1\252\002\017Cordum.Agent.V1\312\002\017cordum\\Agent\\V1\352\002\021Cordum::Agent::V1'
|
|
35
35
|
_globals['_HANDSHAKE_CAPABILITIESENTRY']._loaded_options = None
|
|
36
36
|
_globals['_HANDSHAKE_CAPABILITIESENTRY']._serialized_options = b'8\001'
|
|
37
|
-
_globals['_COMPONENTROLE']._serialized_start=
|
|
38
|
-
_globals['_COMPONENTROLE']._serialized_end=
|
|
37
|
+
_globals['_COMPONENTROLE']._serialized_start=347
|
|
38
|
+
_globals['_COMPONENTROLE']._serialized_end=543
|
|
39
39
|
_globals['_HANDSHAKE']._serialized_start=53
|
|
40
|
-
_globals['_HANDSHAKE']._serialized_end=
|
|
41
|
-
_globals['_HANDSHAKE_CAPABILITIESENTRY']._serialized_start=
|
|
42
|
-
_globals['_HANDSHAKE_CAPABILITIESENTRY']._serialized_end=
|
|
40
|
+
_globals['_HANDSHAKE']._serialized_end=344
|
|
41
|
+
_globals['_HANDSHAKE_CAPABILITIESENTRY']._serialized_start=293
|
|
42
|
+
_globals['_HANDSHAKE_CAPABILITIESENTRY']._serialized_end=344
|
|
43
43
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63ordum/agent/v1/heartbeat.proto\x12\x0f\x63ordum.agent.v1\"\
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63ordum/agent/v1/heartbeat.proto\x12\x0f\x63ordum.agent.v1\"\x9a\x03\n\tHeartbeat\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x10\n\x08\x63pu_load\x18\x04 \x01(\x02\x12\x17\n\x0fgpu_utilization\x18\x05 \x01(\x02\x12\x13\n\x0b\x61\x63tive_jobs\x18\x06 \x01(\x05\x12\x14\n\x0c\x63\x61pabilities\x18\x07 \x03(\t\x12\x0c\n\x04pool\x18\x0b \x01(\t\x12\x19\n\x11max_parallel_jobs\x18\x0c \x01(\x05\x12\x36\n\x06labels\x18\r \x03(\x0b\x32&.cordum.agent.v1.Heartbeat.LabelsEntry\x12\x13\n\x0bmemory_load\x18\x0e \x01(\x02\x12\x14\n\x0cprogress_pct\x18\x0f \x01(\x05\x12\x11\n\tlast_memo\x18\x10 \x01(\t\x12\x12\n\nauth_token\x18\x12 \x01(\t\x12\x12\n\nagent_name\x18\x13 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\x42\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -35,7 +35,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
35
35
|
_globals['_HEARTBEAT_LABELSENTRY']._loaded_options = None
|
|
36
36
|
_globals['_HEARTBEAT_LABELSENTRY']._serialized_options = b'8\001'
|
|
37
37
|
_globals['_HEARTBEAT']._serialized_start=53
|
|
38
|
-
_globals['_HEARTBEAT']._serialized_end=
|
|
39
|
-
_globals['_HEARTBEAT_LABELSENTRY']._serialized_start=
|
|
40
|
-
_globals['_HEARTBEAT_LABELSENTRY']._serialized_end=
|
|
38
|
+
_globals['_HEARTBEAT']._serialized_end=463
|
|
39
|
+
_globals['_HEARTBEAT_LABELSENTRY']._serialized_start=400
|
|
40
|
+
_globals['_HEARTBEAT_LABELSENTRY']._serialized_end=445
|
|
41
41
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -58,5 +58,28 @@ class TestHandshake(unittest.IsolatedAsyncioTestCase):
|
|
|
58
58
|
await agent.close()
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
class TestHandshakePayloadAgentName(unittest.TestCase):
|
|
62
|
+
def test_handshake_payload_with_agent_name(self):
|
|
63
|
+
from cap.handshake import handshake_payload
|
|
64
|
+
|
|
65
|
+
payload = handshake_payload(
|
|
66
|
+
component_id="worker-named",
|
|
67
|
+
capabilities={"job.x": True},
|
|
68
|
+
agent_name=" Claude Code\n— Billing ",
|
|
69
|
+
)
|
|
70
|
+
packet = buspacket_pb2.BusPacket()
|
|
71
|
+
packet.ParseFromString(payload)
|
|
72
|
+
# Sanitized display label round-trips.
|
|
73
|
+
self.assertEqual(packet.handshake.agent_name, "Claude Code — Billing")
|
|
74
|
+
|
|
75
|
+
def test_handshake_payload_agent_name_optional_for_old_clients(self):
|
|
76
|
+
from cap.handshake import handshake_payload
|
|
77
|
+
|
|
78
|
+
payload = handshake_payload(component_id="worker-x")
|
|
79
|
+
packet = buspacket_pb2.BusPacket()
|
|
80
|
+
packet.ParseFromString(payload)
|
|
81
|
+
self.assertEqual(packet.handshake.agent_name, "")
|
|
82
|
+
|
|
83
|
+
|
|
61
84
|
if __name__ == "__main__":
|
|
62
85
|
unittest.main()
|
|
@@ -58,6 +58,34 @@ class TestHeartbeatPayload(unittest.TestCase):
|
|
|
58
58
|
self.assertEqual(packet.heartbeat.last_memo, "")
|
|
59
59
|
self.assertEqual(packet.heartbeat.auth_token, "token-123")
|
|
60
60
|
|
|
61
|
+
def test_heartbeat_payload_with_agent_name(self):
|
|
62
|
+
payload = heartbeat_payload(
|
|
63
|
+
worker_id="worker-an",
|
|
64
|
+
pool="pool-an",
|
|
65
|
+
active_jobs=1,
|
|
66
|
+
max_parallel=4,
|
|
67
|
+
cpu_load=42.0,
|
|
68
|
+
agent_name=" Claude Code\n— Billing ",
|
|
69
|
+
)
|
|
70
|
+
packet = buspacket_pb2.BusPacket()
|
|
71
|
+
packet.ParseFromString(payload)
|
|
72
|
+
# Serializes/deserializes; sanitized (trimmed + whitespace-collapsed).
|
|
73
|
+
self.assertEqual(packet.heartbeat.agent_name, "Claude Code — Billing")
|
|
74
|
+
# agent_name is a DISPLAY label, never an auth authority.
|
|
75
|
+
self.assertEqual(packet.heartbeat.auth_token, "")
|
|
76
|
+
|
|
77
|
+
def test_heartbeat_payload_agent_name_optional_for_old_clients(self):
|
|
78
|
+
payload = heartbeat_payload(
|
|
79
|
+
worker_id="worker-x",
|
|
80
|
+
pool="pool-x",
|
|
81
|
+
active_jobs=0,
|
|
82
|
+
max_parallel=1,
|
|
83
|
+
cpu_load=0.0,
|
|
84
|
+
)
|
|
85
|
+
packet = buspacket_pb2.BusPacket()
|
|
86
|
+
packet.ParseFromString(payload)
|
|
87
|
+
self.assertEqual(packet.heartbeat.agent_name, "")
|
|
88
|
+
|
|
61
89
|
def test_heartbeat_payload_with_memory_constructor(self):
|
|
62
90
|
payload = heartbeat_payload_with_memory(
|
|
63
91
|
worker_id="worker-2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/buspacket_pb2_grpc.py
RENAMED
|
File without changes
|
{cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/handshake_pb2_grpc.py
RENAMED
|
File without changes
|
{cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap/pb/cordum/agent/v1/heartbeat_pb2_grpc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cap_sdk_python-2.13.1 → cap_sdk_python-2.13.2}/cap_sdk_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|