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

Change heartbeat_period type from float to int #1337

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Changed
^^^^^^^

- Changed ``heartbeat_period`` type from float to int for ``GlobusComputeEngine``,
``ProcessPoolEngine``, and ``ThreadPoolEngine`` to maintain parity with the
``HighThroughputEngine`` and Parsl's ``HighThroughputExecutor``.
2 changes: 1 addition & 1 deletion compute_endpoint/globus_compute_endpoint/engines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GlobusComputeEngineBase(ABC):
def __init__(
self,
*args: object,
heartbeat_period: float = 30.0,
heartbeat_period: int = 30,
endpoint_id: t.Optional[uuid.UUID] = None,
**kwargs: object,
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
*args,
label: str = "GlobusComputeEngine",
address: t.Optional[str] = None,
heartbeat_period: float = 30.0,
heartbeat_period: int = 30,
strategy: t.Optional[SimpleStrategy] = SimpleStrategy(),
executor: t.Optional[HighThroughputExecutor] = None,
**kwargs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
self,
*args,
label: str = "ProcessPoolEngine",
heartbeat_period: float = 30.0,
heartbeat_period: int = 30,
**kwargs,
):
self.label = label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
self,
*args,
label: str = "ThreadPoolEngine",
heartbeat_period: float = 30.0,
heartbeat_period: int = 30,
**kwargs,
):
self.label = label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_no_idle_if_not_configured(mocker, endpoint_uuid, mock_spt):

conf = Config(
executors=[mocker.Mock(endpoint_id=endpoint_uuid)],
heartbeat_period=0.01,
heartbeat_period=1,
idle_heartbeats_soft=0,
)
ei = EndpointInterchange(
Expand All @@ -191,7 +191,7 @@ def test_soft_idle_honored(mocker, endpoint_uuid, mock_spt):

conf = Config(
executors=[mocker.Mock(endpoint_id=endpoint_uuid)],
heartbeat_period=0.1,
heartbeat_period=1,
idle_heartbeats_soft=3,
)
ei = EndpointInterchange(
Expand Down Expand Up @@ -229,7 +229,7 @@ def test_hard_idle_honored(mocker, endpoint_uuid, mock_spt):

conf = Config(
executors=[mocker.Mock(endpoint_id=endpoint_uuid)],
heartbeat_period=0.1,
heartbeat_period=1,
idle_heartbeats_soft=1,
idle_heartbeats_hard=3,
)
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_unidle_updates_proc_title(mocker, endpoint_uuid, mock_spt):

conf = Config(
executors=[mocker.Mock(endpoint_id=endpoint_uuid)],
heartbeat_period=0.1,
heartbeat_period=1,
idle_heartbeats_soft=1,
idle_heartbeats_hard=3,
)
Expand Down Expand Up @@ -302,7 +302,7 @@ def test_sends_final_status_message_on_shutdown(mocker, endpoint_uuid):

conf = Config(
executors=[mocker.Mock(endpoint_id=endpoint_uuid)],
heartbeat_period=0.01,
heartbeat_period=1,
idle_heartbeats_soft=1,
idle_heartbeats_hard=2,
)
Expand All @@ -327,7 +327,7 @@ def test_faithfully_handles_status_report_messages(mocker, endpoint_uuid, random

conf = Config(
executors=[mocker.Mock(endpoint_id=endpoint_uuid)],
heartbeat_period=0.01,
heartbeat_period=1,
)
ei = EndpointInterchange(
endpoint_id=endpoint_uuid,
Expand Down
Loading